Same Worksheet Opens Every Time Workbook is opened

R

rmm30

I created a two worksheet workbook.
The first worksheet acts as a very simple welcome page - a graphic an
a button. when you click the button, you are brought to the 2n
worksheet which is filled with info.

I would this 1st worksheet to open up as the first page every time.
So, even if some edits the file, and saves changes. When it is opene
up again, this welcome worksheet is the first page seen.

Is this possible?

P.S. (I do not know VB. I've been copying code from this for
verbatumto use in my projects...which works out nicely thank you.
 
D

DH

put following into thisworkbook module

Private Sub Workbook_Open()
sheets("your welcomesheet name").select
end sub
 
R

rmm30

Thanks for the reply.

I already have code in there:

Private Sub Workbook_Open()
Sheets("DocList").EnableAutoFilter = True
Sheets("DocList").Protect contents:=True, _
userInterfaceOnly:=True
End Sub

How do I enter more code? Do I put a space after the first code o
what?

Thanks
 
J

Jon Peltier

Just insert the additional line:

Private Sub Workbook_Open()
Sheets("DocList").select
Sheets("DocList").EnableAutoFilter = True
Sheets("DocList").Protect contents:=True, _
userInterfaceOnly:=True
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
 
R

rmm30

Thanks Jon.

I don't know what I am doing wrong. I copy and pasted the code yo
provided and it still does not work. The workbook still does not ope
with the front "welcome" page.

Any advice would be great
 
J

Jon Peltier

The code has to be on the "ThisWorkbook" module, not a regular module. In the VBA, find the
project in the project explorer, and double click on the ThisWorkbook item in the list. Paste
the code in this module.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
 
J

Jon Peltier

The mystery has been solved. I looked at the actual file, and realized DocList was not the file
that should be visible on startup. Here's the corrected macro:

Private Sub Workbook_Open()
Sheets("Sheet1").Select
Sheets("DocList").EnableAutoFilter = True
Sheets("DocList").Protect contents:=True, _
userInterfaceOnly:=True
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______


Jon said:
Just insert the additional line:

Private Sub Workbook_Open()
Sheets("DocList").select
Sheets("DocList").EnableAutoFilter = True
Sheets("DocList").Protect contents:=True, _
userInterfaceOnly:=True
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top