Auto open a specified worksheet when excel is opened

matts

New Member
Joined
Sep 11, 2002
Messages
41
When an excel file is opened and it has many worksheets, it will open on the worksheet on which the file was last saved.

Is there any way I can specify that when an Excel file is opened it will always open on a specified worksheet and not the one it was last saved on.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Well, if its for a particular workbook, you can put something like this in its Open() event

Private Sub Workbook_Open()
Sheets(1).Select
End Sub
 
Upvote 0
Private Sub Workbook_Open()
sheets("mysheet").activate
End Sub

You get to this from going alt-F11, Ctrl-R, and double-clicking the bold workbook entry. Then insert this. (untested)
 
Upvote 0
Thankyou for the speedy reply (quoted below), my only question is that I can't get this working. My worksheet that I want to open always when opening a file is called MASTER. I am not too familar with this process so I hope I word it correctly here. I go into the VB editor by pressing Alt-F11, and then on the worksheet I want as my default I double click and enter these lines. I tried replacing the (1) with the worksheet name etc but it isn't working still. Sorry about that..I would appreciate any further help you can offer.



On 2002-09-12 17:16, Juan Pablo G. wrote:
Well, if its for a particular workbook, you can put something like this in its Open() event

Private Sub Workbook_Open()
Sheets(1).Select
End Sub
 
Upvote 0
Thankyou very much....all works fine and is exactly what I needed. I apologise for my inexperience....Have a good day.

On 2002-09-12 17:50, Gates Is Antichrist wrote:
Carefully reread my post.
 
Upvote 0
There's no need to apologize for inexperience. You took the initiative to ask and now you're rolling forward.

You know, I sometimes "cheat" when I'm not sure what to do. If you begin a code statement with
Sheets("MASTER").
then instead of typing Select, or Activate, hit Control-J (right after typing the period). The IDE then shows you your choices for continuing. Then you can separately read the help file for the choices whose names look promising.

Moreover, if you think you know which property or method you want, but aren't sure, but Ctl-J gives just *too* many choices, start typing slowly in the Ctl-J window. For example, if you hit ctl-J and then [slowly] typed the 3 letters ACT or SEL you would see the likely relevant choices move into view. Try it! Even when you become very experienced, it's often a productive way to go.
 
Upvote 0

Forum statistics

Threads
1,214,808
Messages
6,121,684
Members
449,048
Latest member
81jamesacct

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top