Open a excel workbook always on the same sheet
I want to have a excel workbook open up everytime on a particular sheet. This
is irrespective of which sheet i had last accessed and saved the file. However, when i reopen the file anytime, it must open up on sheet 1 (for e.g.) Can anyone help plz regards Nikhil |
Open a excel workbook always on the same sheet
Use the Workbook_Open() event to deal with this. You can use a command like
Worksheets(1).Activate or Worksheets("name on sheet tab").Activate The code has to go into the 'ThisWorkbook' object's code module. Open the workbook and press [Alt]+[F11] to open the VB Editor. Press [Ctrl]+[R] to make sure the "Project - VBAProject" pane is visible and right-click on the 'ThisWorkbook' object in the list (it will be at the bottom of the list of worksheets in the book) and choose [View Code]. Copy and paste this code into the module (change the (1) to use the worksheet name if you prefer) and save the workbook. Private Sub Workbook_Open() Worksheets(1).Activate End Sub Testing it is easy enough, choose another sheet and save & close the workbook and then reopen it. The sheet you identified should be presented to you. "Nikhil" wrote: I want to have a excel workbook open up everytime on a particular sheet. This is irrespective of which sheet i had last accessed and saved the file. However, when i reopen the file anytime, it must open up on sheet 1 (for e.g.) Can anyone help plz regards Nikhil |
All times are GMT +1. The time now is 02:23 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com