Hide sheets when book is opened
I don't believe that you can hide sheets. You can hide a workbook. I am no
expert, but I would suggest using 8 different workbooks (1 for the "Main"
page, and 7 one Sheet workbooks). Double click your ThisWorkbook object in
your Project explorer
Private Sub Workbook_Open()
Application.DisplayAlerts = False 'if individual workbooks contain there own
macros
Workbooks.Open Filename:="C:/FirstBook.xls"
Workbooks.Open Filename:="C:/SecondBook.xls"
etc...
End Sub
the sheets that are now the individual workbook should have the following
code in the ThisWorkbook Object:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
On Error Resume Next 'it may already be visible
Windows("FirstBook.xls").Visible = False
End Sub
Your CommandButtons should unhide the workbook.
Sub CommandButton1_Click()
Windows("FirstBook.xls").Visible = True
end sub
I'm sure that someone will give you a better solution, but It's the best I
can do. Good luck.
"Mark Dullingham" wrote:
I have a work book with a main page that I would like to be the only page the
user sees when they open the book. This page has command buttons to jump to
the other seven pages. I would like to add some code to the buttons to unhide
the pages and then jump to that page.
Could anyone help with this please.
Thanks in advance for any responses.
|