View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Run-time error '1004' on hiding worksheets

Hi Brent,

Try running this version:

Private Sub Workbook_Open()
Dim sh As Worksheet

ThisWorkbook.Sheets("Cost&Marg_01").Visible = True
For Each sh In ThisWorkbook.Worksheets
If UCase(sh.Name) < UCase("Cost&Marg_01") Then
sh.Visible = False
Else
sh.Visible = True
End If
Next
End Sub


---
Regards,
Norman



wrote in message
oups.com...
The sheet "Cost&Marg_01" indeed exists in the file. What else could it
be?