Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I am trying to call up formatting procedures to format sheets, but I don't want to apply the formatting procedures to any sheet with one of the five names as indicated in the sample code below. Why am I getting an error message telling me "Next without For"? Is there a more efficient way to execute this code? Here is the sample code: Set wb = ActiveWorkbook Set sh = ActiveSheet For Each ws In wb If ws.Name = "SUMMARY" Then If ws.Name = "Parameters" Then If ws.Name = "PIVOTDATA" Then If ws.Name = "PIV_Deliverables" Then If ws.Name = "PIV_RC" Then GoTo He Call Formatting Next ws He Application.Goto "Summary_Home" Thanks in advance! -- Kent Lysell Financial Consultant Ottawa, Ontario W: 613.948-9557 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Loop worksheets | Excel Discussion (Misc queries) | |||
Naming Worksheets - Loop within a loop issue | Excel Programming | |||
Naming Worksheets - Loop within a loop issue | Excel Programming | |||
(Complex) Loop within loop to create worksheets | Excel Programming | |||
Loop worksheets | Excel Programming |