ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   OPEN A WORKBOOK TO A SPECIFIC WORKSHEET (https://www.excelbanter.com/excel-discussion-misc-queries/181277-open-workbook-specific-worksheet.html)

Todd

OPEN A WORKBOOK TO A SPECIFIC WORKSHEET
 
I'm using Excel 2003 and trying to figure out how I can open to a specific
worksheet within the workbook. For example, I have tabs with Jan-Dec. I
want to set the workbook to open to the March worksheet automatically. Then
next month I want to change that setting so it will automatically open to the
April worksheet.

Is there a way to make Excel do that?

Thanks.

Todd

Dave Peterson

OPEN A WORKBOOK TO A SPECIFIC WORKSHEET
 
Option Explicit
Sub Auto_Open()
on error resume next
application.goto thisworkbook.worksheets(format(date,"mmm")).range( "a1"), _
scroll:=true
if err.number < 0 then
beep
err.clear
end if
on error goto 0
End Sub

This goes in a General module--not behind a worksheet, not behind ThisWorkbook.


Todd wrote:

I'm using Excel 2003 and trying to figure out how I can open to a specific
worksheet within the workbook. For example, I have tabs with Jan-Dec. I
want to set the workbook to open to the March worksheet automatically. Then
next month I want to change that setting so it will automatically open to the
April worksheet.

Is there a way to make Excel do that?

Thanks.

Todd


--

Dave Peterson

Tyro[_2_]

OPEN A WORKBOOK TO A SPECIFIC WORKSHEET
 
Yes. The workbook will open to the worksheet that was active when the
workbook was saved. So just save it with the desired worksheet active.

Tyro

"Todd" wrote in message
...
I'm using Excel 2003 and trying to figure out how I can open to a specific
worksheet within the workbook. For example, I have tabs with Jan-Dec. I
want to set the workbook to open to the March worksheet automatically.
Then
next month I want to change that setting so it will automatically open to
the
April worksheet.

Is there a way to make Excel do that?

Thanks.

Todd





All times are GMT +1. The time now is 01:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com