Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
I am deleting some sheets of my excel worrk book after doing certain manipulations... I'm using the followin code to delete the sheets... Sheets(Array("Sheet 1", "Sheet 2").Select ActiveWindow.SelectedSheets.Delete but when this command gets executed it ask the excel message asking for confirmation on deleting the sheets from the workbook... is there any way that i can delete the sheets withou asking for the confirmation to delete nstead delete at an instance..... |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try
Application.displayalerts=false Sheets(Array("Sheet 1", "Sheet 2").Select ActiveWindow.SelectedSheets.Delete Application.displayalerts=true Mike "Raj" wrote: Hi all, I am deleting some sheets of my excel worrk book after doing certain manipulations... I'm using the followin code to delete the sheets... Sheets(Array("Sheet 1", "Sheet 2").Select ActiveWindow.SelectedSheets.Delete but when this command gets executed it ask the excel message asking for confirmation on deleting the sheets from the workbook... is there any way that i can delete the sheets withou asking for the confirmation to delete nstead delete at an instance..... |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Assume that missing closing bracket is a typo?
Sheets(Array("Sheet 1", "Sheet 2")).Select .... |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In case sheet 1 or sheet 2 doesn't exist, you may want to use multiple lines:
application.displayalerts = false on error resume next sheets("sheet 1").delete sheets("sheet 2").delete on error goto 0 application.displayalerts = true Raj wrote: Hi all, I am deleting some sheets of my excel worrk book after doing certain manipulations... I'm using the followin code to delete the sheets... Sheets(Array("Sheet 1", "Sheet 2").Select ActiveWindow.SelectedSheets.Delete but when this command gets executed it ask the excel message asking for confirmation on deleting the sheets from the workbook... is there any way that i can delete the sheets withou asking for the confirmation to delete nstead delete at an instance..... -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Jul 13, 9:00 am, Dave Peterson wrote:
In case sheet 1 or sheet 2 doesn't exist, you may want to use multiple lines: application.displayalerts = false on error resume next sheets("sheet 1").delete sheets("sheet 2").delete on error goto 0 application.displayalerts = true Raj wrote: Hi all, I am deleting some sheets of my excel worrk book after doing certain manipulations... I'm using the followin code to delete the sheets... Sheets(Array("Sheet 1", "Sheet 2").Select ActiveWindow.SelectedSheets.Delete but when this command gets executed it ask the excel message asking for confirmation on deleting the sheets from the workbook... is there any way that i can delete the sheets withou asking for the confirmation to delete nstead delete at an instance..... -- Dave Peterson thanks... dave... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
I can't delete my worksheets | Excel Discussion (Misc queries) | |||
SHOULDBE ABLE TO DELETE EXCEL WORKSHEETS EVEN IF NOT DOC CREATOR. | Excel Worksheet Functions | |||
How do I delete unwanted extra pages on Excel worksheets | Excel Discussion (Misc queries) | |||
Find & Delete Duplicates across two Excel Worksheets | Excel Programming | |||
How can I delete ALL text boxes in Excel worksheets? | Excel Discussion (Misc queries) |