Enabled macros

  • Thread starter Thread starter raw
  • Start date Start date
You could try this approach. Your sheets that you want permanently hidden,
set them as xlSheetVeryHidden. Then add this code, which incidentally, also
reverts things at the end

Option Explicit

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheets("Splash").Visible = xlSheetVisible
For Each sh In Sheets
If sh.Name <> "Splash" Then
If sh.Visible = xlSheetVisible Then
sh.Visible = xlSheetHidden
End If
End If
Next sh
thisworkbbok.Save
End Sub

Private Sub Workbook_Open()
Dim sh As Object
For Each sh In Sheets
If sh.Visible <> xlSheetVeryHidden Then
sh.Visible = True
End If
Next sh
Sheets("Splash").Visible = xlSheetVeryHidden
End Sub


'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top