Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
wikegolfa
 
Posts: n/a
Default Workbook startup condition

I have a workbook with a large number of sheets, one of which acts as an
index. When the workbook is opened it opens to the last sheet in use (I
think). I would like the workbook to open onto a specific sheet (i.e. the
Index sheet) each time regardless of which sheet was last used. Is this
possible?

Thanks in anticipation
Adrian
  #2   Report Post  
JulieD
 
Posts: n/a
Default

Hi Adrian

yes, it is possible with a bit of VBA code
right mouse click on a sheet tab
choose view / code - this will open the VBE window
on the left of the screen you should see the name of your workbook in
brackets & bold
under it you should see ThisWorkbook
(if you can't see these try view / project explorer)
double click on ThisWorkbook
on the top right of the screen you should see two drop down boxes
on the left on choose Workbook and a sub should be created for you along the
lines of
sub Workbook_Open()

end sub

copy & paste the following line of code between these two lines

Sheets("Index").Activate

where Index is the name of your sheet

now use ALT & F11 to switch back to the workbook
close & save the workbook - open & test

Cheers
julieD

"wikegolfa" wrote in message
...
I have a workbook with a large number of sheets, one of which acts as an
index. When the workbook is opened it opens to the last sheet in use (I
think). I would like the workbook to open onto a specific sheet (i.e. the
Index sheet) each time regardless of which sheet was last used. Is this
possible?

Thanks in anticipation
Adrian



  #3   Report Post  
wikegolfa
 
Posts: n/a
Default

Julie,
That was easy - worked 1st time. Thanks for your clear instructions.
Regards
Adrian

"JulieD" wrote:

Hi Adrian

yes, it is possible with a bit of VBA code
right mouse click on a sheet tab
choose view / code - this will open the VBE window
on the left of the screen you should see the name of your workbook in
brackets & bold
under it you should see ThisWorkbook
(if you can't see these try view / project explorer)
double click on ThisWorkbook
on the top right of the screen you should see two drop down boxes
on the left on choose Workbook and a sub should be created for you along the
lines of
sub Workbook_Open()

end sub

copy & paste the following line of code between these two lines

Sheets("Index").Activate

where Index is the name of your sheet

now use ALT & F11 to switch back to the workbook
close & save the workbook - open & test

Cheers
julieD

"wikegolfa" wrote in message
...
I have a workbook with a large number of sheets, one of which acts as an
index. When the workbook is opened it opens to the last sheet in use (I
think). I would like the workbook to open onto a specific sheet (i.e. the
Index sheet) each time regardless of which sheet was last used. Is this
possible?

Thanks in anticipation
Adrian




  #4   Report Post  
JulieD
 
Posts: n/a
Default

Hi Adrian

glad to assist & thanks for the feedback.

Cheers
JulieD

"wikegolfa" wrote in message
...
Julie,
That was easy - worked 1st time. Thanks for your clear instructions.
Regards
Adrian

"JulieD" wrote:

Hi Adrian

yes, it is possible with a bit of VBA code
right mouse click on a sheet tab
choose view / code - this will open the VBE window
on the left of the screen you should see the name of your workbook in
brackets & bold
under it you should see ThisWorkbook
(if you can't see these try view / project explorer)
double click on ThisWorkbook
on the top right of the screen you should see two drop down boxes
on the left on choose Workbook and a sub should be created for you along
the
lines of
sub Workbook_Open()

end sub

copy & paste the following line of code between these two lines

Sheets("Index").Activate

where Index is the name of your sheet

now use ALT & F11 to switch back to the workbook
close & save the workbook - open & test

Cheers
julieD

"wikegolfa" wrote in message
...
I have a workbook with a large number of sheets, one of which acts as an
index. When the workbook is opened it opens to the last sheet in use (I
think). I would like the workbook to open onto a specific sheet (i.e.
the
Index sheet) each time regardless of which sheet was last used. Is
this
possible?

Thanks in anticipation
Adrian






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
linking cell value in one workbook to a cell in another workbook Jig Bhakta Links and Linking in Excel 1 January 20th 05 06:12 PM
Stubborn toolbars in Excel 007 Excel Discussion (Misc queries) 9 December 11th 04 02:02 PM
Updating sheets within a workbook Mike R Excel Discussion (Misc queries) 1 December 4th 04 05:25 AM
Question Startup Switches greg Excel Discussion (Misc queries) 2 November 29th 04 11:07 PM
how can I duplicate or copy a workbook then divide selected cells. macros excel... duplication and calculat Excel Discussion (Misc queries) 1 November 29th 04 03:16 PM


All times are GMT +1. The time now is 09:06 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"