How to point to a spreadsheet at startup

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Hi,
I created an index sheet and I would like to point at it when starting up
the file.
Can it be done on off07?
TIA
Mike
 
Let's say that in a given workbook there exists a shhet that should always be
activated when the file is opened. In the workbook code area, include the
following macro:

Private Sub Workbook_Open()
Sheets("index").Activate
End Sub
 
Thanks Gary.
I tried it but when I open the file, Excel still points to the last viewed
sheet instead of Index.
Mike

"Gary''s Student" <[email protected]> escribió en el
mensaje de noticias
 
Let’s make sure it's in the correct place.

Because it is workbook code, it is very easy to install and use:

0. remove the version installed originally
1. right-click the tiny Excel icon just to the left of File on the Menu Bar
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm
 
Gary,
I'm sure your code works, but for some reasons, Excel would not see it at
startup.
I'm using Excel 2007

"Gary''s Student" <[email protected]> escribió en el
mensaje de noticias
 
What level of Macro Security are you running?

If High, the macros are disabled without warning.


Gord Dibben MS Excel MVP
 
Back
Top