Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I started with Tom's suggested code:
Sub visible_sheets() Dim sht As Worksheet worksheets("policy information").visible = xlsheetvisible For Each sht In Worksheets If lcase(sht.Name) < "policy information" Then Sht.Visible = False End If Next End Sub If you're unlucky, "policy information" could be hidden and you could end up with an error--since at least one sheet needs to be visible. Brad wrote: I have a worksheet that I want to hide all the tabs other than "Policy information" What is wrong with the below code. The macro doesn't seem to recognize the line If sheet.Name < "Policy information" Then correctly Sub visible_sheets() Dim sheet As Worksheet For Each sheet In Worksheets If sheet.Name < "Policy information" Then Sheets.Visible = False End If Next End Sub -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro fundamentals | Excel Programming | |||
UDF's Problems; Is my Fundamentals Skewed | Excel Programming | |||
Need syntax for RUNning a Word macro with an argument, called from an Excel macro | Excel Programming | |||
Windows File Dialog box problem from "Office 2000 VBA Fundamentals | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |