P
Pierre
Hi Experts,
I have the following code toset a filer on a sheet called "datadga"
Private Sub but_filter_click()
Dim choice As String
Dim column As Integer
If zoek_acc.Value <> "" Then
choice = zoek_acc.Value
column = 23
ElseIf zoek_status <> "" Then
choice = zoek_status.Value
column = 177
Else
MsgBox "make a choice first !", , "DGA-module"
Exit Sub
End If
With Sheets("datadga")
Range("A1:GZ10000").Select
Selection.AutoFilter Field:=column, Criteria1:=choice
Set filterrange = Cells.SpecialCells(xlCellTypeVisible).Cells(1)
Do
Set filterrange = filterrange.Offset(1, 0)
Loop While filterrange.EntireRow.Hidden = True
Call textboxes_fill
End With
End Sub
I would like to know how many rows meet the criteria but i cannot figure out
how to do that.
I tried a counter just befoor the "Loop..." line but it did not work
correctly, most of the time this counter gave too little rows return
Please help !
Thanks,
Pierre
I have the following code toset a filer on a sheet called "datadga"
Private Sub but_filter_click()
Dim choice As String
Dim column As Integer
If zoek_acc.Value <> "" Then
choice = zoek_acc.Value
column = 23
ElseIf zoek_status <> "" Then
choice = zoek_status.Value
column = 177
Else
MsgBox "make a choice first !", , "DGA-module"
Exit Sub
End If
With Sheets("datadga")
Range("A1:GZ10000").Select
Selection.AutoFilter Field:=column, Criteria1:=choice
Set filterrange = Cells.SpecialCells(xlCellTypeVisible).Cells(1)
Do
Set filterrange = filterrange.Offset(1, 0)
Loop While filterrange.EntireRow.Hidden = True
Call textboxes_fill
End With
End Sub
I would like to know how many rows meet the criteria but i cannot figure out
how to do that.
I tried a counter just befoor the "Loop..." line but it did not work
correctly, most of the time this counter gave too little rows return
Please help !
Thanks,
Pierre