Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a macro that creates a worksheet in a workbook.
Imports data in it formats it, prints it, and then the macro deletes the worksheet. When I run the macro evrything is done perfectly except that I have to interact when a dialog box confirming the deletion of the worksheet pops up. Is there some code that would let the macro answer "OK" to the dialog box so that it could run unattended? My code is as follows: ActiveWindow.SelectedSheets.PrintOut Copies:=1 Sheets("Sheet1").Select ActiveWindow.SelectedSheets.Delete 'Dialog box appears here Range("A6").Select End Sub Thanks in advance |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Louis,
Application.DisplayAlerts = False ActiveWindow.SelectedSheets.Delete HTH Anders Silvén "Louis" skrev i meddelandet ... I have a macro that creates a worksheet in a workbook. Imports data in it formats it, prints it, and then the macro deletes the worksheet. When I run the macro evrything is done perfectly except that I have to interact when a dialog box confirming the deletion of the worksheet pops up. Is there some code that would let the macro answer "OK" to the dialog box so that it could run unattended? My code is as follows: ActiveWindow.SelectedSheets.PrintOut Copies:=1 Sheets("Sheet1").Select ActiveWindow.SelectedSheets.Delete 'Dialog box appears here Range("A6").Select End Sub Thanks in advance |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'll try tha
Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Dialog Box | Excel Discussion (Misc queries) | |||
Macro dialog box won't leave me alone! | Excel Discussion (Misc queries) | |||
Replacement of Testdirector( Test Managment Tool -Mercury Interact | Excel Worksheet Functions | |||
Dialog Box With Macro Buttons (VBA) | Excel Discussion (Misc queries) | |||
how to use the search dialog via a macro? | Excel Worksheet Functions |