Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Opening Excel file on a specific worksheet
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 |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Opening Excel file on a specific worksheet
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 |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Opening Excel file on a specific worksheet
The file will automatically open to the sheet that was open at it's last
save.......... hth Vaya con Dios, Chuck, CABGx3 "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 |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Opening Excel file on a specific worksheet
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 |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Opening Excel file on a specific worksheet
Without code the only way is to save the workbook with that particular sheet
active. A workaround is to add before_close code that renders the workbook unusable if users open without enabling macros. This would consist of code that hides all the sheets except a message sheet that says "You have disabled macros. Close then re-open this workbook with macros enabled or go home for the day since you have nothing to do!" Gord Dibben MS Excel MVP On Thu, 7 Dec 2006 09:47:00 -0800, 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 |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Opening Excel file on a specific worksheet
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 |
#7
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
#8
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Opening Excel file on a specific worksheet
Then I think you'll have to use a macro.
And if the user chooses to disable macros, then they'll have to select the worksheet manually (which doesn't sound too difficult to me). 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Outlook Attachments opening after several errors everytime | Setting up and Configuration of Excel | |||
Calling a specific worksheet from a hyperlink in a seperate file. | Excel Worksheet Functions | |||
opening an excel file opens a duplicate file of the same file | Excel Discussion (Misc queries) | |||
Opening and file associations for Excel | Excel Discussion (Misc queries) | |||
Weekly Transaction Processing | Excel Worksheet Functions |