View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rowan Drummond[_3_] Rowan Drummond[_3_] is offline
external usenet poster
 
Posts: 414
Default Set curser to Same position on open

In the ThisWorkbook module add the following Workbook_Open event.

Private Sub Workbook_Open()

Dim sh As Worksheet
Dim thisSh As Worksheet

On Error GoTo Event_Exit

Set thisSh = ActiveSheet
Application.ScreenUpdating = False
For Each sh In ThisWorkbook.Worksheets
sh.Activate
Application.Goto Range("A1"), True
Next sh
thisSh.Activate
Event_Exit:
Application.ScreenUpdating = True
End Sub

Hope this helps
Rowan

Martin wrote:
I have a workbook with 3 pages. How can I set the curser on each page to a
starting position of cell A1 when the workbook is opened? Preferably,
something to the number of sheets in the workbook as they may fluctuate.

Thank you,