Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following code.
The following sub is written for deleting a worksheet that has its name as 0. Code works but I dont get the desired result. Sub test1() Dim ws as worksheet For each ws InThisWorkbook.Worksheets If ws.name = 0 then Application.DisplayAlerts = False ws.delete End If Next End Sub The following sub is written for deleting worksheets if its index number is greater than 3. Again, Code works but dont get the desired result. Sub test2() Dim ws as worksheet For each ws InThisWorkbook.Worksheets Application.DisplayAlerts = False If ws.index 3 then ws.delete End If Next End Sub Any idea why this happens? Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
PLEASE HELP! Copy sheet with password protected cells debug error | Excel Programming | |||
Error Won't Debug | Excel Programming | |||
debug error | Excel Programming | |||
down with the debug error | Excel Programming | |||
debug message pops up when I select a range of cells and delete | Excel Programming |