With the folowwing code, I try to walk trough the filterd rows of a table:
Sub GetConfigDataLists()
Dim xRange As Range
Set xRange = Sheets("config").ListObjects("config_table").DataBodyRange
xRange.AutoFilter 1, "Lists"
xRange.Select
For Each Row In xRange
'Try to read in a variable
MsgBox (row)
Next Row
End Sub
The Table is a simple table with the name config_tabel
[TABLE="width: 500"]
<tbody>[TR]
[TD]Parameter [/TD]
[TD]Field [/TD]
[TD]Value[/TD]
[/TR]
[TR]
[TD]Lists [/TD]
[TD]Risks[/TD]
[TD]Top5Risks[/TD]
[/TR]
[TR]
[TD]Lists [/TD]
[TD]Issues [/TD]
[TD]Top5Issues[/TD]
[/TR]
[TR]
[TD]Startup [/TD]
[TD]Sheet [/TD]
[TD]Progress[/TD]
[/TR]
[TR]
[TD]Location [/TD]
[TD]save [/TD]
[TD]c:\temp[/TD]
[/TR]
</tbody>[/TABLE]
When I filterd and run the code, all Fields are displayed in the messagebox...
How can I read the filterd cells : Field and Value...
Sub GetConfigDataLists()
Dim xRange As Range
Set xRange = Sheets("config").ListObjects("config_table").DataBodyRange
xRange.AutoFilter 1, "Lists"
xRange.Select
For Each Row In xRange
'Try to read in a variable
MsgBox (row)
Next Row
End Sub
The Table is a simple table with the name config_tabel
[TABLE="width: 500"]
<tbody>[TR]
[TD]Parameter [/TD]
[TD]Field [/TD]
[TD]Value[/TD]
[/TR]
[TR]
[TD]Lists [/TD]
[TD]Risks[/TD]
[TD]Top5Risks[/TD]
[/TR]
[TR]
[TD]Lists [/TD]
[TD]Issues [/TD]
[TD]Top5Issues[/TD]
[/TR]
[TR]
[TD]Startup [/TD]
[TD]Sheet [/TD]
[TD]Progress[/TD]
[/TR]
[TR]
[TD]Location [/TD]
[TD]save [/TD]
[TD]c:\temp[/TD]
[/TR]
</tbody>[/TABLE]
When I filterd and run the code, all Fields are displayed in the messagebox...
How can I read the filterd cells : Field and Value...