View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Phil Hageman Phil Hageman is offline
external usenet poster
 
Posts: 80
Default Need Before_Save code

Trevpr and John,
Used the Array code - it puts the cursor in A1,
and "Scorecard" is the active worksheet, but in all
worksheets, the scroll does not put the document where A1
is visible. To test, I put the cursor at the end of each
worksheet - that is what is visible when opening.

Is there a scroll instruction to use?
Phil
-----Original Message-----
Or:

Sub Auto_Open()
Application.ScreenUpdating = False
Worksheets(Array

("Employee", "Customer", "Finance", "Scorecard")).Select
Range("A1").Select
Worksheets("Scorecard").Select
Application.ScreenUpdating = True
End Sub

Regards

Trevor


"John Wilson" wrote in message
...
Phil,

If, as you say, you want a standard set-up when the user
"opens" the workbook, a simple way would be as follows:

Sub Auto_Open()
Application.ScreenUpdating = False
Worksheets("Employee").Activate
Range("A1").Activate
Worksheets("Customer").Activate
Range("A1").Activate
Worksheets("Finance").Activate
Range("A1").Activate
Worksheets("Scorecard").Activate
Range("A1").Activate
Application.ScreenUpdating = True
End Sub

The above macro, when placed in a regular module, will

run whenever
the workbook is opened and insure that "Scorecard" is

the active sheet
and that cell "A1" is the active cell on all the sheets.

John

Phil Hageman wrote:

My workbook is named Scorecard, and its worksheets are
entitled Scorecard, Customer, Finance, and Employee.

When the user clicks the Save icon, I want the cursor

in
each worksheet to be placed in Cell A1, and the

worksheet
named Scorecard to be the the last worksheet changed.

The object is that when a another user first opens the
Workbook, the worksheet named Scorecard comes up

first,
and as each of the other worksheets is opened, it

shows
the top of the worksheet - thus the force of cursor to
cell A1.

Thanks, Phil





.