Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have a user form which acts as a DB front end for a spreadsheet and I want it to skip any rows hidden by AutoFilter. I constructed the following code based on chapter 9 in "Excel 2003 VBA Programmer's reference" . The code loops through the next rows in the range and tests if they are hidden. Unfortunately, it doesn't work as expected and seems to skip rows that aren't hidden and show ones that are. Private Sub cmdNextRecord_Click() Dim i As Integer i = 1 With Range("Database") Do While RangeData.Rows(Navigator.Value + i).EntireRow.Hidden = True i = i + 1 Loop If RangeData.Row < .Rows(.Rows.Count).Row Then 'Load next record only if not on last record Navigator.Value = Navigator.Value + i End If End With End Sub Regards JT |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
List Visible Data | Excel Worksheet Functions | |||
Printing only Rows with Visible Data | Excel Discussion (Misc queries) | |||
How to plot only visible autofiltered rows in a data list | Charts and Charting in Excel | |||
Copy visible rows with data to new file | Excel Programming | |||
List Box Visible Rows Only | Excel Programming |