PDA

View Full Version : Solved: Eliminate prompt



jwise
01-31-2008, 09:20 AM
My macro takes a worksheet, renames it, and then adds and builds a new worksheet which is the old worksheet "repaired". I then ask if I should delete the "old" version. Because I also wanted to use this macro to process a large number of worksheets, I added an optional parameter that tells the macro to delete this "old" worksheet (eliminating my prompt). However, I still get the prompt from Excel telling me that I may be deleting data. Is there a way I can eliminate this Excel prompt? I tried to find this through the Help and could not locate a parameter to add to the "Delete".

Bob Phillips
01-31-2008, 10:03 AM
Application.DisplayAlerts = False
'do it
Application.DisplayAlerts = True

jwise
01-31-2008, 01:11 PM
Thanks XLD... the code does exactly what I needed.