View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
John Wilson John Wilson is offline
external usenet poster
 
Posts: 550
Default VBA code to open a specific worksheet

Mark,

In a regular module:

Sub Auto_Open()
Worksheets("yoursheetname").Activate
End Sub

or you can user the Workbook_Open Event

John

MohK wrote:

Does anyone know the code to open a specific worksheet within a workbook
when you first open the workbook?

I have a main input page within the workbook and would like this to be
the worksheet that opens or is viewable when i first open the workbook
regardless of where i save my work.

Many thanks
Mark

------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/