![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Apr 2002
Location: Dublin, Ireland
Posts: 51
|
Hi! I have an auto open macro that opens the same worksheet every time:
Sub auto_open() Sheets("Sheet1").Select Beep End Sub There are, however, multiple worksheets in my workbook and I want the macro to open the worksheet that was open when the file wasa last closed, i.e. If "Sheet3" was the last worksheet in use when last session was terminated, then the next user to open the file should find "Sheet3" open when the new session is launched. Any suggestions out there? |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Posts: 117
|
I can tell you that excel will remember the last sheet opened upon saving your workbook everytime you close it. If you remove the macro, excel will open to the last sheet before it was closed.
I hope this is what your asking? Todd |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Apr 2002
Location: Dublin, Ireland
Posts: 51
|
Todd, I explained poorly. My question isn't quite that straight forward. What I should have said:
Let's say I have a workbook with 5 worksheets. Sheets 1 and 2 are reference tables. Sheets 3, 4 and 5 are in regular use. Say I am working between sheets 3, 4 and 5, but sheet 1 is the last sheet I use before closing the file. When the file is reopened, it will default to sheet 1. What I want to happen here is that instead of opening sheet 1, Excel remembers the last worksheet used (excluding sheets 1 and 2) and opens the last used sheet 3, 4 or 5. Hope this is clearer. |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Location: Where the wild roses grow
Posts: 285
|
You could just save it on the sheet you want it to open on
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Apr 2002
Location: Dublin, Ireland
Posts: 51
|
There are multiple users of this file. I need to know which of the sheets 3, 4 or was used last by the previous user.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|