Workbook jumps to Sheet1, cell A1, regardless of where it was whenlast saved

M

Michael Lanier

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
 
G

Gary Keramidas

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top