PC Review


Reply
Thread Tools Rate Thread

Default a specific worksheet to be in forefront when open excel?

 
 
=?Utf-8?B?amJhbmtlcnQ=?=
Guest
Posts: n/a
 
      1st Mar 2006
Have multiple worksheets in an excel file and want a specific worksheet to be
in the forefront when opening the excel file. How to do this?
 
Reply With Quote
 
 
 
 
Bernie Deitrick
Guest
Posts: n/a
 
      1st Mar 2006
j,

Put this code into the codemodule of the ThisWorkbook Object.

Private Sub Workbook_Open()
Worksheets(1).Activate
End Sub

Change the 1 to the specific sheet index.

Or, if the users can change the order of the sheets or add new sheet, and you want a specific sheet
selected:

Private Sub Workbook_Open()
Worksheets("Sheet Name").Activate
End Sub

Or, if users might change the name on the tab of that specific sheet:

Private Sub Workbook_Open()
shtCodeName.Activate
End Sub

If you are unclear on the how to implement any of these, post back.

HTH,
Bernie Deitrick
MS Excel MVP


"jbankert" <(E-Mail Removed)> wrote in message
news:1D5080E2-6DF2-4789-9E5E-(E-Mail Removed)...
> Have multiple worksheets in an excel file and want a specific worksheet to be
> in the forefront when opening the excel file. How to do this?



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Is there a way to open an excel file to a specific worksheet? Gord Dibben Microsoft Excel Misc 0 5th Dec 2006 10:29 PM
RE: Open EXCEL worksheet to one specific location =?Utf-8?B?c2hpc3Rpcg==?= Microsoft Excel Worksheet Functions 0 18th Sep 2004 12:05 AM
Re: Open EXCEL worksheet to one specific location RagDyer Microsoft Excel Worksheet Functions 0 17th Sep 2004 11:28 PM
Open EXCEL worksheet to one specific location =?Utf-8?B?c2hpc3Rpcg==?= Microsoft Excel Worksheet Functions 0 17th Sep 2004 10:11 PM
How do you open a specific worksheet using an Excel Driver? Murphy Microsoft Excel Programming 0 28th May 2004 11:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:42 AM.