Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can anyone tell me why the code below only works on the worksheet that's
active when it is run? My hope was that it would go to each worksheet (excluding Holidays) and remove all shapes and clear the value in cell F1 Sub HolidayRemove() Protection.UnProtectAllSheets For n = 1 To Sheets.Count If Sheets(n).Name < "Holidays" Then With Sheets(n) ActiveSheet.Shapes.SelectAll Selection.Delete Range("K1").Value = "" End With End If Next n Protection.ProtectAllSheets End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Run VBA code only worksheet change, but don't trigger worksheet_change event based on what the code does | Excel Programming | |||
RANK not resulting as hoped | Excel Discussion (Misc queries) | |||
Not getting hoped for result | Excel Programming | |||
Shorten code to apply to all sheets except a few, instead of individually naming them, and later adding to code. | Excel Programming | |||
Excel code convert to Access code - Concat & eliminate duplicates | Excel Programming |