Asi
09-21-2010, 12:49 AM
Hi
I filtered a table like this:
ThisWorkbook.Sheets(1).Range(DBRange).AutoFilter Field:=Col3, Criteria1:=Val
The result of the filter gives me list of ID's on the first column that I need to do something with. In other words I need to check all the filtered values on the first column.
I started with:
ThisWorkbook.Sheets(1).Activate
ThisWorkbook.Sheets(1).Cells(1, 1).Select
and then if I do the following - I get all values even if they are hidden.
While ActiveCell.Offset(i, 0).Value <> ""
ID = ActiveCell.Offset(i,0).Value
i = i + 1
Wend
When I do it manually with key arrows (not via VBA) I jump only on the visible cells like I want to.
How can I run on all visible cells ? do I need to check visibility or can I do something like XlDown somewhere ?
I filtered a table like this:
ThisWorkbook.Sheets(1).Range(DBRange).AutoFilter Field:=Col3, Criteria1:=Val
The result of the filter gives me list of ID's on the first column that I need to do something with. In other words I need to check all the filtered values on the first column.
I started with:
ThisWorkbook.Sheets(1).Activate
ThisWorkbook.Sheets(1).Cells(1, 1).Select
and then if I do the following - I get all values even if they are hidden.
While ActiveCell.Offset(i, 0).Value <> ""
ID = ActiveCell.Offset(i,0).Value
i = i + 1
Wend
When I do it manually with key arrows (not via VBA) I jump only on the visible cells like I want to.
How can I run on all visible cells ? do I need to check visibility or can I do something like XlDown somewhere ?