Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open workbook to specific worksheet
I think there is an easy solution to this, but I can't find it.
I have a workbook divided into 12 worksheets, one for each month. On opening the workbook, I would like it to open at the worksheet for the current month. Can anyone help with a code for this? Thanks -- Linda |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open workbook to specific worksheet
Put the following into the ThisWorkbook module:
Private Sub Workbook_Open() Sheets(Format(Now, "mmmm")).Activate End Sub I'm assuming you've called the sheets January, February etc. "mathel" wrote: I think there is an easy solution to this, but I can't find it. I have a workbook divided into 12 worksheets, one for each month. On opening the workbook, I would like it to open at the worksheet for the current month. Can anyone help with a code for this? Thanks -- Linda |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open workbook to specific worksheet
Thank you so much. Actually the worksheets are named 'Jan', 'Feb', etc., so
I simply changed what you wrote to 'mmm'. It works perfectly! -- Linda "Smallweed" wrote: Put the following into the ThisWorkbook module: Private Sub Workbook_Open() Sheets(Format(Now, "mmmm")).Activate End Sub I'm assuming you've called the sheets January, February etc. "mathel" wrote: I think there is an easy solution to this, but I can't find it. I have a workbook divided into 12 worksheets, one for each month. On opening the workbook, I would like it to open at the worksheet for the current month. Can anyone help with a code for this? Thanks -- Linda |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open workbook to specific worksheet
This isn't working for me in Excel 2007. Did something change?
"Smallweed" wrote: Put the following into the ThisWorkbook module: Private Sub Workbook_Open() Sheets(Format(Now, "mmmm")).Activate End Sub I'm assuming you've called the sheets January, February etc. "mathel" wrote: I think there is an easy solution to this, but I can't find it. I have a workbook divided into 12 worksheets, one for each month. On opening the workbook, I would like it to open at the worksheet for the current month. Can anyone help with a code for this? Thanks -- Linda |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open workbook to specific worksheet
Lots of things changed, but not this stuff.
Did you allow macros to run? Do you have a sheet that's named February? Did you put the code in the ThisWorkbook module? Lori H. wrote: This isn't working for me in Excel 2007. Did something change? "Smallweed" wrote: Put the following into the ThisWorkbook module: Private Sub Workbook_Open() Sheets(Format(Now, "mmmm")).Activate End Sub I'm assuming you've called the sheets January, February etc. "mathel" wrote: I think there is an easy solution to this, but I can't find it. I have a workbook divided into 12 worksheets, one for each month. On opening the workbook, I would like it to open at the worksheet for the current month. Can anyone help with a code for this? Thanks -- Linda -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Open Workbook on Specific Worksheet | Excel Discussion (Misc queries) | |||
OPEN A WORKBOOK TO A SPECIFIC WORKSHEET | Excel Discussion (Misc queries) | |||
Open Workbook to Specific Worksheet? | Excel Discussion (Misc queries) | |||
Open a specific worksheet in workbook | Excel Programming | |||
On open workbook go to a specific worksheet | Excel Programming |