Opening a workbook on a specified sheet.

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

I posted this subject on Dec 31 and got great help. I
was given this code to use so that when I open my multi
sheet document, it would always open on a specified
sheet. I named first sheet A1 "StartPoint" and put in
this code, but it does not seem to work. Any ideas from
anyone??

Private Sub Workbook_Open()
Application.ScreenUpdating = False
Dim n As Integer
For n = 1 To Worksheets.Count
Worksheets(n).Select
Application.Goto Reference:=Range("a1"), Scroll:=True
Next n
Application.Goto Reference:="StartPoint", Scroll:=True
Application.ScreenUpdating = True
End Sub
 
Hi Mike!

The code must be put into the ThisWorkbook module.

If your security settings are at High or (Excel 2003) Very High the
macro will be disabled.

Did you get any error messages?

The code works alright for me.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Mike, how about just this?

Private Sub Workbook_Open()
Sheets("StartPoint").Select
Range("A1").Select

End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 97
** remove news from my email address to reply by email **
 
Norman,
I did have to change my security settings to Medium.
Thanks for all the help.
Mike
 
Hi Mike!

Good to hear that it's now working sweetly.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Back
Top