Quote:
Originally Posted by Hdata
Yes, I have word tables previously setup with updateable cell formulas. I also have a list of cell references which I would like to GoTo in order to update these formulas.
|
You don't need to 'Goto' or 'Select' anything for this. All you need is something like:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim ArrTbls, ArrRows, ArrCols, i As Long
ArrTbls = Array(1, 1, 3, 3, 4, 5)
ArrRows = Array(6, 8, 6, 8, 6, 6)
ArrCols = Array(4, 4, 5, 7, 2, 2)
With ActiveDocument
For i = 0 To UBound(ArrTbls)
.Tables(ArrTbls(i)).Cell(ArrRows(i), ArrCols(i)).Range.Fields.Update
Next
End With
Application.ScreenUpdating = True
End Sub
With this code, you use three arrays, one each for the tables, rows & columns to be updated. Each array contains its respective table index, row index and cell index for the cells you want to update. In the above demo, the first set of array entries points to table 1, row 6 column 4, the second set of array entries points to table 1, row 8 column 4, and so on.