: XL5/VBA: Knowing the rows selected with xlFilterInPlace

: XL5/VBA: Knowing the rows selected with xlFilterInPlace

Post by Harri Kinnun » Wed, 24 Jan 1996 04:00:00



How can I know which rows matched the criteria after using
AdvancedFilter method with xlFilterInPlace?

Is the only way to check for .Hidden property for each row in the
target range?

Using xlFilterCopy would naturally work, but it's clumsy and propably
time-consuming.

This is not really mission-critical, and I'm going with ".Hidden"
approach, but if someone in/up/out here/there has a cooler method, I'd
be glad to know...

Thanks in advance,
-Harri

 
 
 

1. VBA: Can't select the rows betweeen 2 Range Names (but not including)

Hi,
I have 2 range Names:
ClientDetails is cell A6
SiteDetails is cell A51.

I wish to use this information and Hide/Unhide rows 7:50 but can't
figure out the syntax.

Thanks in advance
Peter

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Excel.Range,
Cancel As Boolean)
Dim StartRow As String
Dim EndRow As String

If Target.Row = 1 Then
    Rows("2:5").Select

ElseIf Target.Row = Range("ClientDetails").Row Then
    StartRow = Str(Range("ClientDetails").Row + 1)
    EndRow = Str(Range("SiteDetails").Row - 1)
'At this point I can get StartRow = "7" and EndRow = "50"
'but cant get the next line to work.
    Rows("StartRow:EndRow").Select
'    Rows("7:50").Select

Else
    GoTo Continue1
End If

If Selection.EntireRow.Hidden = True Then
    Selection.EntireRow.Hidden = False
Else
    Selection.EntireRow.Hidden = True
End If
ActiveCell.Offset(-1, 0).Range("A1").Select
Cancel = True

Continue1:
End Sub

2. String length in a datagrid

3. VBA code to select a range of rows?

4. 1 MB A4000 Simms

5. select non adjacent rows in vba in excel

6. Proxy ignored; user maps to FAL$SERVER

7. VBA: Select Rows

8. Debugger won't work with CLR programs

9. Type mismatch when selecting a row using a variable for the row

10. VBA code to delete row based on vaule of one cell within that row?

11. Getting row data from a selected row?

12. Multiple rows in table but display single row in select statement

13. print row headings on each page (XL5)?