![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Posts: 97
|
How can I do that a specific sheet pops up when I open the workbook that contains it.
Hugo |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
You mean like, if I have "Sheet1", "Sheet2" and "Sheet3", how do I make "Sheet3" be the active sheet when the file is opened? You can do it this way.
1. Right-Click on the Excel icon to the left of the "File" menu. 2. Choose "View Code" 3. Copy and paste this code in: Private Sub Workbook_Open() Sheets("Sheet3").Activate End Sub The only problems with this are that you'll get a flicker of the first page no matter what you do. If you're not using macros in your workbook then you're substituting one mouse click for another. The user will now have to hit "Enable Macros" on startup. One really easy way to make a specific page be the active page on startup is to move it to the front of the sheet order. To do this just drag and drop the sheet name tab to the start of the workbook. |
|
|
|
|
|
#3 |
|
Guest
Posts: n/a
|
You said :-
"One really easy way to make a specific page be the active page on startup is to move it to the front of the sheet order." This is not correct. If a workbook is saved before closing, when it is re-opened the active sheet will be the one that was active when it was closed. It follows, therefore, that another way (altho not necessarily preferable) of specifying the active sheet upon opening is by :- Private Sub Workbook_BeforeClose(Cancel As Boolean) Worksheets("Sheet3").Activate ThisWorkbook.Save End Sub |
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|