View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Opening Excel file on a specific worksheet

But that suffers from the same problem (allowing macros) that workbook_open has.

And even worse, if you save without closing, then you may be on a different
worksheet when the save finishes. (That would be very irritating to me.)

Elkar wrote:

You could add a BeforeSave event code to change the sheet to the appropriate
one. Something like:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Worksheets("Sheet1").Activate
End Sub

HTH,
Elkar

"sdhaight" wrote:

I know but I can't control what page other users may be on when they save so
I need something that will always go back to sheet1 when the next user opens
the file regardless of where the last user saved.

"Dave Peterson" wrote:

If the workbook is saved with Sheet1 active, then it'll open to that sheet.



sdhaight wrote:

Hello,

I have read some of your postings and found the macro below to open the file
on a specific worksheet but I'm wondering if there's a function besides a
macro for doing this. My concern is that our file will be used by 100
different users on different versions of Excel so I'm not sure it will work
consistently. Also, unless macro security is set to low, the user will be
promted to enable the macro and it won't work if they say no. Any other
options?

Private Sub Workbook_Open()
Worksheets("Sheet1").Activate
End Sub

Thanks so much,
Sherry

--

Dave Peterson


--

Dave Peterson