ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Opening a Title Page (https://www.excelbanter.com/excel-worksheet-functions/46246-opening-title-page.html)

Ray Lloyd

Opening a Title Page
 
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.
--
Crime Pays...
Unless you''re a motorist!

swatsp0p


With your desired workbook open, right click on the small spreadsheet
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. Save
your file (have a different sheet active). Close and reopen. It
should open to your 'Title_Sheet'.

Good Luck.

Bruce


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=469106


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


"Ray Lloyd" wrote in message
...
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.
--
Crime Pays...
Unless you''re a motorist!




Ray Lloyd

Many thanks guys! Worked a treat.
--
____________________
Crime Pays...
Unless you''re a motorist!


"swatsp0p" wrote:


With your desired workbook open, right click on the small spreadsheet
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. Save
your file (have a different sheet active). Close and reopen. It
should open to your 'Title_Sheet'.

Good Luck.

Bruce


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=469106




All times are GMT +1. The time now is 07:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com