VB to get to top of page

  • Thread starter Thread starter ArcticWolf
  • Start date Start date
A

ArcticWolf

Hi,

I have a sheet which contains 20+ pivot tables. I have a 2nd sheet with a
load of buttons on, which when clicked take the user to the correct part of
the pivot table sheet.

Sheets("Pivot Tables").Select
Range("A211").Select

The pivot table sheet is 500+ lines (some of the PT's are quite big!) and I
have 'split' the sheet so the first 2 rows are always shown.

When I click on the button it takes me to the correct location, but it puts
me in the 'middle of the screen' (I then have to scroll down, half a page to
see the full table) I would like it so that in the instance above the rows
will go 1, 2, 211, 212 (it currently goes 1, 2, 188, 189, 190..... so row 211
is in the middle of the screen.
I don't want to hide or remove any of the rows, just have them show at the
top of the screen insread of in the middle.

I hope that makes sense, and is possible?

TIA,

AW
 
How about a nice ONE liner. change sheet and range to suit

Sub gothere()
Application.Goto Sheets("forms").Range("a13"), scroll:=True
End Sub
 
Perfect, cheers Don.

Don Guillett said:
How about a nice ONE liner. change sheet and range to suit

Sub gothere()
Application.Goto Sheets("forms").Range("a13"), scroll:=True
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(e-mail address removed)


.
 
Back
Top