Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Outlook Attachments opening after several errors everytime cito_support Setting up and Configuration of Excel 2 March 13th 06 07:15 PM
Calling a specific worksheet from a hyperlink in a seperate file. TheChris Excel Worksheet Functions 0 February 2nd 06 02:48 AM
opening an excel file opens a duplicate file of the same file skm Excel Discussion (Misc queries) 1 December 7th 05 06:52 PM
Opening and file associations for Excel Star Excel Discussion (Misc queries) 1 October 6th 05 01:55 PM
Weekly Transaction Processing Ralph Howarth Excel Worksheet Functions 4 January 19th 05 06:37 AM


All times are GMT +1. The time now is 09:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"