Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting a worksheet
I had great help with my last problem from bpeltzer.
Here is my new problem. I now want to delete some worksheets without Excel asking me if I really want to do it. I am using the code below: Sheets("Sheet1").Select ActiveWindow.SelectedSheets.Delete Sheets("Sheet2").Select ActiveWindow.SelectedSheets.Delete I want to do this automatically without having to click on the delete dialogue box that appears. Any ideas? Thanks in advance, Martin |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting a worksheet
Place
Application.DisplayAlerts = False prior to deleting the sheets. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Martin" wrote in message ... I had great help with my last problem from bpeltzer. Here is my new problem. I now want to delete some worksheets without Excel asking me if I really want to do it. I am using the code below: Sheets("Sheet1").Select ActiveWindow.SelectedSheets.Delete Sheets("Sheet2").Select ActiveWindow.SelectedSheets.Delete I want to do this automatically without having to click on the delete dialogue box that appears. Any ideas? Thanks in advance, Martin |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting a worksheet
Try
Application.DisplayAlerts = False Sheets("Sheet1").Select ActiveWindow.SelectedSheets.Delete Sheets("Sheet2").Select ActiveWindow.SelectedSheets.Delete Application.DisplayAlerts = True Jan "Martin" skrev i en meddelelse ... I had great help with my last problem from bpeltzer. Here is my new problem. I now want to delete some worksheets without Excel asking me if I really want to do it. I am using the code below: Sheets("Sheet1").Select ActiveWindow.SelectedSheets.Delete Sheets("Sheet2").Select ActiveWindow.SelectedSheets.Delete I want to do this automatically without having to click on the delete dialogue box that appears. Any ideas? Thanks in advance, Martin |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting a worksheet
Hi Martin,
Try: Sub Tester() Application.DisplayAlerts = False Sheets(Array("Sheet1", "Sheet2")).Delete Application.DisplayAlerts = True End Sub --- Regards, Norman "Martin" wrote in message ... I had great help with my last problem from bpeltzer. Here is my new problem. I now want to delete some worksheets without Excel asking me if I really want to do it. I am using the code below: Sheets("Sheet1").Select ActiveWindow.SelectedSheets.Delete Sheets("Sheet2").Select ActiveWindow.SelectedSheets.Delete I want to do this automatically without having to click on the delete dialogue box that appears. Any ideas? Thanks in advance, Martin |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting a worksheet
Thanks a lot. It's easy when you know how - unfortunately I don't
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
deleting of worksheet | Excel Discussion (Misc queries) | |||
Deleting a worksheet but retaining values from the worksheet. | Excel Discussion (Misc queries) | |||
Deleting a worksheet but retaining values from the worksheet. | Excel Discussion (Misc queries) | |||
deleting values in a worksheet without deleting the formulas | Excel Worksheet Functions | |||
deleting worksheet | Excel Programming |