I am trying to use the Table.Uniform property to determine if a table has merged or split cells.
The problem is that with some tables the Uniform property gives a "False" value even though the table is uniform. With such tables, statements such as Selection.Tables(1).Rows
.Cells.Count work whereas if the table were in fact not uniform a 5991 error would occur.
The method that I use to determine if a table is truly uniform is to get the row and column number of every cell in the table to determine the number of cells in every row with:
ReDim cellsInRow(aTable.Rows.Count)
For Each aCell In aTable.Range.Cells
cellsInRow(aCell.RowIndex) = aCell.ColumnIndex
Next aCell
However this is time consuming for large tables.
Does anyone know how to overcome the bug with the Table.Uniform property or a better way than mine to identify uniform tables?
PS I have tried using error trapping but it still time consuming.
The problem is that with some tables the Uniform property gives a "False" value even though the table is uniform. With such tables, statements such as Selection.Tables(1).Rows
The method that I use to determine if a table is truly uniform is to get the row and column number of every cell in the table to determine the number of cells in every row with:
ReDim cellsInRow(aTable.Rows.Count)
For Each aCell In aTable.Range.Cells
cellsInRow(aCell.RowIndex) = aCell.ColumnIndex
Next aCell
However this is time consuming for large tables.
Does anyone know how to overcome the bug with the Table.Uniform property or a better way than mine to identify uniform tables?
PS I have tried using error trapping but it still time consuming.