Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-10-2017, 05:21 AM
macropod's Avatar
macropod macropod is offline GoTo Cell Reference in wdTable Windows 7 64bit GoTo Cell Reference in wdTable Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default


Quote:
Originally Posted by Hdata View Post
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.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
GoTo Cell Reference in wdTable Reference Word Table Cell Using Offset? wlcdo2 Word VBA 2 06-19-2016 08:53 PM
GoTo Cell Reference in wdTable Assign the value of a cell as a cell reference of another cell in Excel 2010 - How to? bharathkumarst Excel 7 10-13-2014 10:25 AM
Locking A Cell Reference Regardless skoz55 Excel 8 05-16-2014 09:15 AM
GoTo Cell Reference in wdTable Keeping an absolute reference in a cell bremen22 Excel 7 01-16-2014 11:06 AM
GoTo Cell Reference in wdTable How to reference a cell value Jmoney2290 Excel 1 11-06-2013 09:39 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:41 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft