How to start Excel on a specific Worksheet.

D

Don J

I always want Excel to start on a specific Worksheet whenever I open a
particular Workbook. How can I do that?

Don J

-----------------------------------------------------
 
J

JMay

Use the Workbook.Open event in the Object Module ThisWorkbook

Private Sub Workbook_Open()
Sheets("MyWorksheetName").Activate
End Sub
 
D

Don J

I don't know how to do this. What is the 'Workbook.Open' event? Also where
is the 'Object Module', and what is 'ThisWorkbook'?

Don J

------------------------------------------------------------------------------
 
G

Gord Dibben

Don

With your workbook open, right-click on the Excel logo left of "File" if your
window is maximized or on the title bar Excel logo if not maximized.

Select "View Code" and Thisworkbook module will open.

Paste JMay's code into that module............make sure to substitute your real
worksheet name instead of "MyWorksheetName". The double quotes must be used.

Close that window. Save your workbook and close it.

Each time you open it, it will open to the worksheet you have named no matter
where you were when you last saved/closed.


Gord Dibben MS Excel MVP
 
D

Don J

When I load the Workbook I get a "Microsoft Excel" error that says:

"Macros are disabled because the security level is set to high and a
digitally signed Trusted Certificate is not attached to the macros. To run
the macros, change the security level to a lower setting (not recommended),
or request the macros be signed by the author using a certificate issued by
a Certificate Authority."

Sounds like setting the security level lower would be the easiest thing to
do. How do I do it?

Don J

------------------------------------------------------------------------------
 
D

Dave Peterson

Tools|Macro|Security|Security level tab

Change to Medium (to be prompted each time you open a workbook with macros)
change to low (to avoid the prompt, MS recommends against this)

And then close your workbook and reopen it.

Don said:
When I load the Workbook I get a "Microsoft Excel" error that says:

"Macros are disabled because the security level is set to high and a
digitally signed Trusted Certificate is not attached to the macros. To run
the macros, change the security level to a lower setting (not recommended),
or request the macros be signed by the author using a certificate issued by
a Certificate Authority."

Sounds like setting the security level lower would be the easiest thing to
do. How do I do it?

Don J

------------------------------------------------------------------------------
 
D

Don J

Thank you "J May", "Gord Dibben" and "Dave Peterson". You have all
contributed to my being able to successfully open a Workbook to a specific
Worksheet. Thank you again!

Don J
 
G

Gord Dibben

You're welcome.

Good luck.


Gord

Thank you "J May", "Gord Dibben" and "Dave Peterson". You have all
contributed to my being able to successfully open a Workbook to a specific
Worksheet. Thank you again!

Don J
 

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