Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This procedure produces the error "Do loop without Do? How come?
- - - - -- - - - - - - Public Sub HideSelectedSheetsOLD() Dim Wsh As Worksheet Dim Counter As Integer For Each Wsh In ActiveWorkbook.Sheets Counter = 7 Do If UCase(Intersect(Wsh.Columns(Counter), Wsh.Rows(1))) = "HIDE" Then Wsh.Visible = xlSheetHidden Counter = Counter + 1 Loop Until Counter = 26 Next End Sub - - - - - - - - - - John Wirt |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi John
as far as i can tell - you're missing an END IF in the DO LOOP which is confusing things. Cheers JulieD "John Wirt" wrote in message ... This procedure produces the error "Do loop without Do? How come? - - - - -- - - - - - - Public Sub HideSelectedSheetsOLD() Dim Wsh As Worksheet Dim Counter As Integer For Each Wsh In ActiveWorkbook.Sheets Counter = 7 Do If UCase(Intersect(Wsh.Columns(Counter), Wsh.Rows(1))) = "HIDE" Then Wsh.Visible = xlSheetHidden Counter = Counter + 1 Loop Until Counter = 26 Next End Sub - - - - - - - - - - John Wirt |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes, Thanks. John
"JulieD" wrote in message ... |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
you're welcome and thanks for the feedback
"John Wirt" wrote in message ... Yes, Thanks. John "JulieD" wrote in message ... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find loop doesn't loop | Excel Discussion (Misc queries) | |||
How do I create a For loop within a For loop? | Excel Programming | |||
For/Loop skipping one value in loop only | Excel Programming | |||
Worksheet_Change - loop within a loop | Excel Programming | |||
HELP!!!! Can't stop a loop (NOT an infinite loop) | Excel Programming |