Q
Question Boy
Hello,
I'm looking for some coding help to delete tables based on a criteria.
I have a doc containing a series of tables. I need to delete the one that
have a format 3 rows
row 1 - 3 cols merged together - Table title
row 2 - 3 cols (1 Desc, 2 '--', 3 '--')
row 3 - 3 cols (1 Empty, 2 '--', 3 '--')
Also, the cells that display '--' are in fact formulas which have a value =
0 and whose formula = $#,##0;($#,##0);'--'
So I am trying to loop through all the table within the document and delete
only the table whose row2 - Col2 & 3 = '--' and row3 - Col2 & 3 = '--' how
can I do this?
I have the basic loop
intTbl = ActiveDocument.Tables.Count
For t = intTbl To 1 Step -1
intRows = ActiveDocument.Tables(t).Rows.Count
If intRows = 3 Then
End If
Next t
However I don't know how to check the 4 cells for their values to ensure
they are = '--'?
Thank you for your help,
QB
I'm looking for some coding help to delete tables based on a criteria.
I have a doc containing a series of tables. I need to delete the one that
have a format 3 rows
row 1 - 3 cols merged together - Table title
row 2 - 3 cols (1 Desc, 2 '--', 3 '--')
row 3 - 3 cols (1 Empty, 2 '--', 3 '--')
Also, the cells that display '--' are in fact formulas which have a value =
0 and whose formula = $#,##0;($#,##0);'--'
So I am trying to loop through all the table within the document and delete
only the table whose row2 - Col2 & 3 = '--' and row3 - Col2 & 3 = '--' how
can I do this?
I have the basic loop
intTbl = ActiveDocument.Tables.Count
For t = intTbl To 1 Step -1
intRows = ActiveDocument.Tables(t).Rows.Count
If intRows = 3 Then
End If
Next t
However I don't know how to check the 4 cells for their values to ensure
they are = '--'?
Thank you for your help,
QB