avoid warning when removing sheet
Hi Tijimen.
Try:
iSheetMax = Sheets.Count
Application.DisplayAlerts = False
' Delete other sheets
For iSheet = 2 To iSheetMax
Sheets(2 + iSheetMax - iSheet).Delete
Next
Application.DisplayAlerts = True
---
Regards,
Norman
"Tijmen" wrote in message
...
I want to remove all sheets except of sheet 1 by a macro
iSheetMax = Sheets.Count
' Delete other sheets
For iSheet = 2 To iSheetMax
Sheets(2 + iSheetMax - iSheet).Delete
Next
Then the user gets a warning message (warns for permanently deleting of
sheet).
I do not want this.
How can I prevent the warning message to appear?
Thanks,
Tijmen
|