Opening a Title Page

R

Ray Lloyd

I have a Workbook with several sheets. As you know, Excel opens the page you
were on when last saved. I would like to have Excel open up on my Title
Sheet regardless of where I was in the Workbook when saving.

Someone mentioned the 'onopen' function. I'd be grateful for a step-by-step
guide to inserting the code.
 
S

swatsp0p

With your desired workbook open, right click on the small spreadshee
icon to the left of the "File" menu item at the top of the window.
Click 'View Code'. This opens the VBA editor to the workbook project.
Paste this code into the blank pane on the right hand side:



Private Sub Workbook_Open()
Sheets("Title_Sheet").Select
Range("A1").Select
End Sub

Change "Title_Sheet" to the name of the desired sheet to open to....

press ALT + Q to close the editor and return to your workbook. Sav
your file (have a different sheet active). Close and reopen. I
should open to your 'Title_Sheet'.

Good Luck.

Bruc
 
B

Bernie Deitrick

Ray,

Copy the code below, press Alt-F11 to open the VB Editor, press Ctrl-R to
open the project explorer, double click on your workbook to open it, then
double-click on the ThisWorkbook object, then in the window to the right
(usually). Paste the code into that window (paste over any other
workbook_open subs), and it should behave as you want, after you change
the sheet name in the code to reflect your actual title sheet name.

HTH,
Bernie
MS Excel MVP

Private Sub Workbook_Open()
Worksheets("Title Sheet").Activate
End Sub
 
Top