Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
In a macro I have, I first clear the data then delete a worksheet named
Decision and the macro stops and asks for user input by displaying a dialog box that asks for a response with an OK via mouse click on the DELETE button or a CANCEL. Is there code that will press the DELETE button automatically and avoid the stoppage? Here is the code that exist currently. Sheets("Decision").Select Application.CutCopyMode = False Cells.Select Selection.Clear ActiveWindow.SelectedSheets.Delete Thank you |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Drop the clearing stuff.
application.displayalerts = false ActiveWindow.SelectedSheets.Delete application.displayalerts = true Remember that the workbook has to have at least one visible sheet. Shu of AZ wrote: In a macro I have, I first clear the data then delete a worksheet named Decision and the macro stops and asks for user input by displaying a dialog box that asks for a response with an OK via mouse click on the DELETE button or a CANCEL. Is there code that will press the DELETE button automatically and avoid the stoppage? Here is the code that exist currently. Sheets("Decision").Select Application.CutCopyMode = False Cells.Select Selection.Clear ActiveWindow.SelectedSheets.Delete Thank you -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Shu
Selection.Clear Application.DisplayAlerts = False ActiveWindow.SelectedSheets.Delete Application.DisplayAlerts = True Gord Dibben MS Excel MVP On Mon, 29 Jan 2007 09:42:01 -0800, Shu of AZ wrote: In a macro I have, I first clear the data then delete a worksheet named Decision and the macro stops and asks for user input by displaying a dialog box that asks for a response with an OK via mouse click on the DELETE button or a CANCEL. Is there code that will press the DELETE button automatically and avoid the stoppage? Here is the code that exist currently. Sheets("Decision").Select Application.CutCopyMode = False Cells.Select Selection.Clear ActiveWindow.SelectedSheets.Delete Thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA: For Count, when count changes from cell to cell | Excel Discussion (Misc queries) | |||
Text formatting | Excel Worksheet Functions | |||
Help With Macro Code?? | Excel Worksheet Functions | |||
Transfer Macro code to another computer | Excel Discussion (Misc queries) | |||
Macro for changing text to Proper Case | Excel Worksheet Functions |