Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
DisplayAlerts not working?
Hi,
Can someone possibly explain what's happening with this: Worksheets(1).Delete Application.DisplayAlerts = False This appears to work on occasions - as in, I have the same piece of code several places, and some of the sheets are deleted without confirmation, some need confirmation. Anyone any ideas why this is happening? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
DisplayAlerts not working?
You need to turn alerts off prior to the code that will generate the alert
and then be darned sure to turn it back on again when the code completes... Application.DisplayAlerts = False Worksheets(1).Delete Application.DisplayAlerts = True -- HTH... Jim Thomlinson "Aaron" wrote: Hi, Can someone possibly explain what's happening with this: Worksheets(1).Delete Application.DisplayAlerts = False This appears to work on occasions - as in, I have the same piece of code several places, and some of the sheets are deleted without confirmation, some need confirmation. Anyone any ideas why this is happening? Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
DisplayAlerts not working?
Switch the order:
Application.DisplayAlerts = False Worksheets(1).Delete "Aaron" wrote in message ... Hi, Can someone possibly explain what's happening with this: Worksheets(1).Delete Application.DisplayAlerts = False This appears to work on occasions - as in, I have the same piece of code several places, and some of the sheets are deleted without confirmation, some need confirmation. Anyone any ideas why this is happening? Thanks |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
DisplayAlerts not working?
Ah thanks, that would explain why it works sometimes and not others as well!
"Jim Thomlinson" wrote: You need to turn alerts off prior to the code that will generate the alert and then be darned sure to turn it back on again when the code completes... Application.DisplayAlerts = False Worksheets(1).Delete Application.DisplayAlerts = True -- HTH... Jim Thomlinson "Aaron" wrote: Hi, Can someone possibly explain what's happening with this: Worksheets(1).Delete Application.DisplayAlerts = False This appears to work on occasions - as in, I have the same piece of code several places, and some of the sheets are deleted without confirmation, some need confirmation. Anyone any ideas why this is happening? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
DisplayAlerts = false not working | Excel Programming | |||
Displayalerts not working | Excel Programming | |||
Application.Displayalerts = value (is not working for me) | Excel Programming | |||
application.displayalerts is not working | Excel Programming | |||
Application::DisplayAlerts not working | Excel Programming |