Scroll filtered sheet to top

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using Office 2003 on Windows XP.

I have a program that moves a user from one sheet to another, then filters
the destination sheet based on what the user clicked on the first sheet. The
destination sheet must have a frozen split screen turned on.

Depending upon where the cell pointer is, sometimes the visible rows are
scrolled out of view. I need a code string that will cause the view to scroll
all the way to the top so that all unfiltered rows are visible to the user.

Could someone please post example code to do this?

Thanks much in advance.
 
Hi,
Have you tried the Application.Goto method? It takes care of activating the
destination sheet and can scroll to the destination range.
'-------------------------------------
Sub test()
Dim rg As Range
Set rg = ActiveWorkbook.Worksheets("Sheet2").Range("AZ100")

Application.Goto reference:=rg, scroll:=True
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

Back
Top