Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete Sheet
I have this code to delete the sheet. Pretty simple. How can I have it
delete the sheet without any user intervention? Sheets("wcexcel").Select ActiveWindow.SelectedSheets.Delete |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete Sheet
When would you like the sheet deleted? It needs to be done on some
action (i.e. when a cell is selected, when the file is opened, etc.) |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete Sheet
One way:
Application.DisplayAlerts = False Sheets("wcexcel").Delete Application.DisplayAlerts = True In article , "Dthmtlgod" wrote: I have this code to delete the sheet. Pretty simple. How can I have it delete the sheet without any user intervention? Sheets("wcexcel").Select ActiveWindow.SelectedSheets.Delete |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete Sheet
The answer to your question depends on when you need the sheet deleted. If
no user intervention, the routine needs some way to know it is time to delete - so when is that? For example, if you want it to delete when the user closes the workbook, you would put the code in the Workbook_BeforeClose event procedure. On another topic - to simplify the code further: Sheets("wcexcel").Delete "Dthmtlgod" wrote: I have this code to delete the sheet. Pretty simple. How can I have it delete the sheet without any user intervention? Sheets("wcexcel").Select ActiveWindow.SelectedSheets.Delete |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete Sheet
Hi, when you say deleting without user intervention do you mean without
having to respond to a prompt asking you if you want to delete the sheet or cancel? If so, try this: Application.DisplayAlerts = False Sheets("wcexcel").Delete Application.DisplayAlerts = True HTH--Lonnie M. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete Sheet
Yah, like JE McGimpsey said... :)
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Delete ROW on Sheet#1 corupts data on Sheet#2 | Excel Worksheet Functions | |||
Delete values in sheet 2 that arre found in sheet 1 | Excel Discussion (Misc queries) | |||
Delete rows from one sheet containing deatils on the second sheet | New Users to Excel | |||
How do I un-delete a sheet? | Excel Discussion (Misc queries) | |||
delete sheet | Excel Programming |