Excel opening sheet

  Craig.m 22:08 19 Feb 2007
Locked

Can an Excel sheet be made to open on the same page every time rather than the last point you were at when you saved the sheet?

  VoG II 22:12 19 Feb 2007

Right click the Excel logo just to the left of File on the menu bar, View code. Paste in



Private Sub Workbook_Open()
Application.Goto reference:=Sheets("Sheet1").Range("A1"), scroll:=True
End Sub


Adjust sheet name and range to suit.

  Craig.m 22:30 19 Feb 2007

Run time error '9';

Subscript out of range

Is the message I got - tried it on other workbooks and it was fine but the one with earlier search VB in it throws up this error, a little confusing.

  VoG II 22:34 19 Feb 2007

Well, you have to have a Sheet1 for it to work.

Alter the code to your actual sheet name.

  Craig.m 22:35 19 Feb 2007

OK, have had a fiddle and come up with the solution of a naming error - as per the bottom of your post.

Thanks

Craig

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Alienware 17 R4 2017 review

These brilliant Lego posters show just what children's imaginations are capable of

Mac power user tips and hidden tricks

Comment réinitialiser votre PC, ordinateur portable ou tablette Windows ?