Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a very simple subroutine that deletes certain worksheets.
Unfortunately, the macro crashes if the worksheet does not exist (not the usual case, but does happen). Sheets("Summary").Select ActiveWindow.SelectedSheets.Delete ....and so on, with other sheet names (but not all the sheet names)... I tried: If Sheets("Summary") Is Nothing Then .... End If That gives me a "Run-time error '9': Subscript out of range" error. How can I check to see if this sheet exists before trying to delete it? Thank you, Judy |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
check if worksheet exists | Excel Worksheet Functions | |||
check to see if sheet exists | Excel Programming | |||
How to check if a worksheet exists in worksheet collection | Excel Programming | |||
Check whether a worksheet exists already | Excel Programming | |||
check if worksheet exists | Excel Programming |