bigal.nz
11-17-2014, 01:21 AM
Hi All,
I want to loop through every the first cell in every row of a table.
The table has one cell that spans across the top of all columns (merged) but from row2 onwards has 4 colums and dpending on the size of the list can have an infinite number of rows.
How would I loop through the first column in each row, but not row1.
I had this :
Private Sub CommandButton2_Click()
Set ChargesTable = ActiveDocument.Tables(1)
For Each oRow In ChargesTable.Rows
Set oCell = oRow.Cells(1)
MsgBox oCell.Range.Text
Next
End Sub
But that doesnt start at row 2.
Cheers
-Al
I want to loop through every the first cell in every row of a table.
The table has one cell that spans across the top of all columns (merged) but from row2 onwards has 4 colums and dpending on the size of the list can have an infinite number of rows.
How would I loop through the first column in each row, but not row1.
I had this :
Private Sub CommandButton2_Click()
Set ChargesTable = ActiveDocument.Tables(1)
For Each oRow In ChargesTable.Rows
Set oCell = oRow.Cells(1)
MsgBox oCell.Range.Text
Next
End Sub
But that doesnt start at row 2.
Cheers
-Al