Open a workbook at a specific sheet

  • Thread starter Thread starter Kevin
  • Start date Start date
K

Kevin

I have a spreadsheet that contains over 200 sheets. I have
created a 'main' sheet and want to know if it is possible
to have the spreadsheet open on this sheet only. I have
looked through the knowledge base with out any luck so I
am hoping someone can assist me.
 
Go to tools, macro,visual basic editor,double click on this
workbook, select workbook in place of general open & write
the following codes
Private Sub Workbook_Open()
Worksheets("sheet2").Activate
End Sub
 
Hi

What do you mean by 'on this sheet only'? That when workbook is opened,
always one particular sheet is activated, but the user can freely open any
other sheet afterwards? Place this sheet as leftmost one. Or, when users
have habit to mess your sheets up, use Rai's suggestion.

When you want, that users can access only one sheet, hide rest of them.
There are 2 levels of hidding sheet:
1. You can hide the sheet(s), selecting it/them (to select multiple sheets,
hold down Ctrl key and select wanted sheet's tabs, or activate first/last
sheet tab of would-be selection, press Shift key and select last/first tab
of selection), and then from menu Format.Sheet.Hide. To unhide hidden
sheets, it's enough to select Format.Sheet.Unhide.SheetName from menu

2. When you want to prevent the user unhiding sheet(s), Press Alt+F11,
select the sheet in VBA Project window, activate Properties window when it's
not activated, and set the sheet's Visible property to xlSheetVeryHidden.
The sheets set to very hidden don't show up in Format.Sheet.Unhide window,
and you can unhide them only changing Visible propertie. When you are afraid
that your users ar too clever and can unhide the sheet even from Properties
window, then in VBA Project window, right-click on your project, and select
Properties.Protection. Here can you protect your project with password. It's
enough for most of users.


Arvi Laanemets
 
Kevin said:
I have a spreadsheet that contains over 200 sheets. I have
created a 'main' sheet and want to know if it is possible
to have the spreadsheet open on this sheet only. I have
looked through the knowledge base with out any luck so I
am hoping someone can assist me.

have you not heard of IT support desks? I'm sure the DoD has a help
desk. Why don'y you log a job with them? What are you doing putting
your email address out in to the Internet where spam engines can find
it and cause all sorts of hassles for the DoD with the amount of spam
they're going to send you? I guess you're going to expect that my
taxpayer's money will be used to fix that spam problem too.
 
Back
Top