View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ken Johnson Ken Johnson is offline
external usenet poster
 
Posts: 1,073
Default Macro fundamentals


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


Get rid of that s..

Sheet.Visible = False NOT Sheets.Visible = False

Ken Johnson