Set position of non frooze rows when panes are frooze

A

Aaron

I have a macro running with sheets that have panes frooze, lets say row one
is frooze. At the end of the macro the activities of the macro are such that
the first visible row after one is say row six (2-5 have gotten rolled up
behind frozen row one) How do I say at the end of my code "Next row after
frooze pane that is visible is row 2"?
 
R

Rick Rothstein \(MVP - VB\)

I am not sure that will work if there are any blank rows above the currently
active cell. I think this will work though...

Cells(2, ActiveCell.Column).Select

Rick
 
A

Aaron

Ok, worked great, but did not work at all when filters where applied. Anyway
to say cells(first filtered row, 1).select?
 
R

Rick Rothstein \(MVP - VB\)

Try this macro... I think it will work for either case (Filter on/off)...

Sub GoToTop()
Dim X As Long
For X = 2 To Rows.Count
If Range("A" & CStr(X)).Height > 0 Then
ActiveSheet.Cells(X, ActiveCell.Column).Activate
Exit For
End If
Next
End Sub

Rick
 

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

Top