Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scrolling in VBA

Status
Not open for further replies.
Jun 5, 2002
417
AU
Hi,

I am updating sheets in Excel via VBA and I want the scroll position of the sheets to be moved down as part of each update so the relevant areas of the sheet are visible when I go to look at the sheet.

I have tried:

Application.GoTo Sheets([B2]).Range([R11]), True

where B2 is the sheetname, and R11 is the Cell address I want to be able to see, but VBA is not happy with this.

What do I need to do to get this to work?

Thanks in anticipation.

Peter Moran
 
B2 is the sheetname, and R11 is the Cell address
Perhaps this ?
Application.GoTo Sheets("B2").Range("R11"), True

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
or:
v1=[B2]
v2=[R11]
Application.GoTo Sheets(v1).Range(v2), True

combo
 
You can too:

Application.GoTo Sheets([B2].Value).Range([R11].Value), True

as the error arises due to that [B2] directly returns range, not value.

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top