Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I am trying to come up with a VB routine IN XL2007 which hides all but a
specified sheet. In the test routine I have written the specified sheet is the first sheet, but this is arbitrary. I would be most grateful if someone could explain the error I get when I try to compile the following: Sub Testsub() Dim Sheet, Sheet_ As Worksheet, I As Integer Set Sheet = ActiveWorkbook.Sheets(1) MsgBox ActiveWorkbook.Sheets.Count For I = 1 To ActiveWorkbook.Sheets.Count Set Sheet_ = ActiveWorkbook.Sheets(I) If Sheet_ < Sheet Then Sheet_.Hide Next Sheet.Activate End Sub -- -regards |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Compile Error. Else without If? | Excel Discussion (Misc queries) | |||
Compile Error on Chr(13) | Excel Discussion (Misc queries) | |||
compile data | Excel Discussion (Misc queries) | |||
help help help compile error | Excel Discussion (Misc queries) | |||
compile errors | Excel Discussion (Misc queries) |