Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
In a macro I have, I create a new worksheet to do some work in and then
later in the macro, I delete the worksheet since it is no longer needed. (There is another worksheet in this workbook that is always there when this macro runs) When the macro sends the command to delete the worksheet, a msgbox pops up telling me that there may be data in the worksheet I'm deleting and am I sure that I want to delete it. I click on the "Delete" button and the macro continues on its merry way. How can I either get rid of the msgbox appearing, or put something in the macro that will automatically select "Delete" on the msgbox so that there is no interaction from the user required for the macro to finish running? -Brian |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
In your code to delet the sheet you need to insert:-
Application.DisplayAlerts = false following this you then need the code to delete the sheet and then you need to have:- Application.DisplayAlerts = True To turn the alerts back on again, otherwise you wont be alerted about anything else which may happen in your sheet. Hope this helps, Mat For Excel Tutorials and Tips: http://teachr.blogspot.com Brian Beck wrote: In a macro I have, I create a new worksheet to do some work in and then later in the macro, I delete the worksheet since it is no longer needed. (There is another worksheet in this workbook that is always there when this macro runs) When the macro sends the command to delete the worksheet, a msgbox pops up telling me that there may be data in the worksheet I'm deleting and am I sure that I want to delete it. I click on the "Delete" button and the macro continues on its merry way. How can I either get rid of the msgbox appearing, or put something in the macro that will automatically select "Delete" on the msgbox so that there is no interaction from the user required for the macro to finish running? -Brian |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
AUtomatically hiding a row when a certain cell is blank | Excel Discussion (Misc queries) | |||
Automatically Hiding Blank Rows | Excel Discussion (Misc queries) | |||
How do I stop an Excel sheet from automatically hiding rows when . | Excel Worksheet Functions | |||
hiding columns automatically | Excel Discussion (Misc queries) | |||
hiding columns automatically | Excel Discussion (Misc queries) |