View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default hide sheet on file open

Hi,

I would suggest you hide the sheets before closing but this does require
the workbook to be saved

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheets("Sheet1").Visible = xlVeryHidden
ThisWorkbook.Save
End Sub

If saving is undesirable then do it on open but if macros aren't enabled
then this fails

Private Sub Workbook_Open()
Sheets("Sheet1").Visible = xlVeryHidden
End Sub

Mike


"Hein" wrote:

How can I set a file that when I open it certain sheets are hidden and others
not?
Thanks