Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That is probably as easy as any. Any other method would take a bit more
code I think. You can do it without selecting or activating: Dim rng as Range set rng = ActiveCell Do set rng = ActiveCell.Offset(1,0) Loop until rng.EntireRow.Hidden = False or rng.row = 50 if rng.EntireRow.Hidden = False then rng.Select else msgbox "No more visible data" End if -- Regards, Tom Ogilvy "Kevin McCartney" wrote in message ... This works but is there a better way Do Application.Cells(Application.ActiveCell.Row + 1, Application.ActiveCell.column).Activate Loop Until Not Application.ActiveSheet.Rows(Application.ActiveCel l.Row).Hidden "Kevin McCartney" wrote: I have a data entry form that has Next, Previous buttons which navigate through the worksheet, my problem is that if the users leave a filter I only want to navigate through the visible rows, like using the cursor, the problem is that my code navigates through the hidden rows, so my questions is how to I make my code only navigate through the visible rows. Application.Cells(Application.ActiveCell.Row + 1, Application.ActiveCell.column).Activate TIA KM |