View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default Workbook jumps to Sheet1, cell A1, regardless of where it was when last saved

maybe this:

Private Sub Workbook_Open()
With Me
If .Worksheets("Sheet1").Range("O70").Value = 0 Then
.Worksheets("Sheet1").Activate
Application.Goto .Worksheets("Sheet1").Range("A1"), scroll:=True
End If
End With
End Sub

--

Gary Keramidas
Excel 2003


"Michael Lanier" wrote in message
...
I use the following macro to jump to a particular worksheet when a
workbook is opened and Sheet1!O70=0, however I'd like to modify it so
that when those conditions are met, the cursor will rest on a
particular cell such as A1. Are there any suggestions? Thanks in
advance.

Michael

Private Sub Workbook_Open()
With Me
If .Worksheets("Sheet1").Range("O70").Value = 0 Then
.Worksheets("Sheet1").Activate
End If
End With
End Sub