Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Excel 2003 - How do I change which sheet in my workbook opens firs

I have a multiple sheet Excel workbook that I reference often, but it opens
to a middle sheet, not to the first sheet like I want. Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Excel 2003 - How do I change which sheet in my workbook opens firs

If you save the workbook with the "correct" worksheet the active worksheet, then
excel remembers that the next time you open it.

If you don't want to do that, you can use a macro to select the sheet that you
want. This goes into a general module:

Option Explicit
Sub Auto_Open()
application.goto thisworkbook.worksheets("sheet9999").range("a1"), _
scroll:=true
End Sub

Change the sheet name to what you want.

ExtraLarge XL User wrote:

I have a multiple sheet Excel workbook that I reference often, but it opens
to a middle sheet, not to the first sheet like I want. Any ideas?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default Excel 2003 - How do I change which sheet in my workbook opens firs

Put this one-liner in the workbook's _Open() event handler:

Worksheets(1).Activate

To get the right click on the Excel icon immediately to the left of the
"File" menu option in the Excel window and choose [View Code] from the list.
Copy the code below and paste it into the code module presented to you:

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

That's a macro, so you're going to have to enable macros when you open the
workbook for it to happen. You may need to set your macro security to allow
it to run. I recommend a Macro Security (Tools | Macro | Security) setting
of Medium vs Low. You'll get a 'nag' when you open the workbook, but I'd
rather put up with that than to have someone send me a workbook with
malicious code and allow it to run without alerting me. Once you change the
security level setting you have to close Excel and then reopen for the new
setting to take effect.

"ExtraLarge XL User" wrote:

I have a multiple sheet Excel workbook that I reference often, but it opens
to a middle sheet, not to the first sheet like I want. Any ideas?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I show file extensions when a workbook opens in excel 2003 Luis Excel Discussion (Misc queries) 1 June 8th 06 11:39 AM
Excel opens but workbook does not open Nagraj Excel Discussion (Misc queries) 2 April 17th 06 12:59 PM
Excel workbook opens a new workbook keithl816 Excel Discussion (Misc queries) 3 March 9th 06 03:28 PM
Personal workbook opens when Excel opens SheriTingle Excel Discussion (Misc queries) 2 March 30th 05 12:22 AM
Change workbook sheet reference using cell A1 to change a vairable Reed Excel Worksheet Functions 4 January 20th 05 07:15 PM


All times are GMT +1. The time now is 06:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"