Opening on a specific worksheet

  • Thread starter Thread starter NealUK
  • Start date Start date
N

NealUK

Is there any way that i can get a spreadsheet to open on, for example,
sheet5, when a shortcut icon is clicked?
I am thinking along the lines of a command line parameter.
Any help anyone can offer would be much appreciated
regards
Neal
 
Neal
You would use a Worksheet_Open macro for this. This macro would be a
part of your file. For example:
Private Sub Workbook_Open()
Sheets("MySheet").Activate
End Sub

This macro has to be placed in the Workbook module. To get there,
right-click on the icon to the left of the word "File" in the menu across
the top of the Excel window. Select View Code. Paste this macro into the
module. X-out to get back to your spreadsheet. HTH Otto
 
Thanks for the reply Otto, problem is, the file itself is on the server at
work, and quite a few people access it, so i don't want to make that the
default for everyone.
I have a shortcut icon on the desktop, and was hoping that i could somehow
add a command line parameter to open at a specific sheet.
Do you know of a way this can be achieved?
Again thanks for the reply
regards
Neal
 
AFAIK you would need the workbook open event. There is no command switch
that runs a macro.
 
Back
Top