Hi all,
Silly question but this is so unintuitive for me:
I can do Table.Rows(Cnt) but apparently I'll get Run-time error 5941: requested member of the collection does not exist.
But I can certainly access the cells if I do:
However, this is not the solution I'm looking for. I just need to retrieve the 3rd cell, which I do know exist cause it did print out 3 MsgBox...
Silly question but this is so unintuitive for me:
VBA Code:
For Each Table in Doc.tables
For Cnt=1 to Table.Rows.Count
Row = Table.Rows(Cnt)
If ...
DataRow = Table.Rows(Cnt+1)
MsgBox DataRow.Cells(2)
End If
Next Cnt
Next Table
I can do Table.Rows(Cnt) but apparently I'll get Run-time error 5941: requested member of the collection does not exist.
But I can certainly access the cells if I do:
Code:
For Each Table in Doc.tables
For Cnt=1 to Table.Rows.Count
Row = Table.Rows(Cnt)
If ...
DataRow = Table.Rows(Cnt+1)
For Each Cel in DataRow.Cells
MsgBox Cel
Next Cel
End If
Next Cnt
Next Table
However, this is not the solution I'm looking for. I just need to retrieve the 3rd cell, which I do know exist cause it did print out 3 MsgBox...