Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatically open up to the same worksheet each time you open 2

Status
Not open for further replies.

icsupt

MIS
Jun 14, 2004
150
US
How do you open up to the first worksheet (tab named "MainMenu") each time you open up your Excel file. I want to send an Excel file to a few people and I want Excel to automatically open to MainMenu each time they go into the file. Let's say they open up the Excel file which is an attachment in Outlook. They use the hyperlinks that I have on the MainMenu tab to navigate to the different worksheets. I want Excel to always open up to MainMenu even if when they exited the workbook, they were on a different sheet.

Is there a way to always to go the MainMenu tab?

Thanks in advance.
 
Hi,
Only using VBA code.

Right click the sheet tab and select View Code.

In the VB Editor, Ctrl+R will dislay the Project Explorer

In the Project Explorer, various Excel Objects are displayed -- Worksheets and ThisWorkbook. Right click the ThisWorkbook Object and select View Code

This opens the Code Window for the ThisWorkbook Object.

In the Upper LH corner of the code window is the Objects dropdown. Open it and select Workbook

In the Upper RHcorner of the code window is the Procedures dropdown. Open it and select Open

This is the code for the Workbook_Open Event. Copy 'n' paste this code.
Code:
Private Sub Workbook_Open()
   WorkSheets{"MainMenu"}.Activate
End Sub





Skip,

[glasses] [red]Be advised:[/red] The dyslexic, agnostic, insomniac, lays awake all night wondering...
"Is there really a DOG?" [tongue]
 


Oh BTW,

your users MUST hit the Enable Macros button is their Macro Secuity is set to MEDIUM. (Tools/Macro/Security)

Skip,

[glasses] [red]Be advised:[/red] The dyslexic, agnostic, insomniac, lays awake all night wondering...
"Is there really a DOG?" [tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top