Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macros in Word Document Tables

Status
Not open for further replies.

enigma333

Programmer
Jul 3, 2001
42
CA
I need a way to specify the cells in a table in a word document.

i.e. on exit cell goto cell below

can this be done in vba?
 
Sorry To clarify.
I need to run a script when the user exits a table cell which will take the cell that the user left and specify the next cell to goto based upon it.
 
Why don't you use formfields for your table entry? You'll need to protect at least that part of your document, but formfields have an on-exit from which you can run code, etc.

View-Toolbars-Forms. Check them out. I think you'll like them, 'specially for tables.

If you need to protect just your table, you can insert a continuous section break above the table, and another below it.

If you previously had a one-section doc, it would make it 3 sections now, and you'll want to Tools-Protection, checkmark Forms, hit sections and protect Section 2.
techsupportgirl@home.com
Brainbench MVP for Microsoft Word
 
This is a bit tedious for 20+ cells i was hoping for a way to have vba calculate the current cell on exit and use some algorithm to determine what the next should be
Thanks
 

Selection.Information (wdStartOfRangeColumnNumber)
Selection.Information (wdStartOfRangeRowNumber)
 
Great!! Thats the first part ... now i need to specify a destination Cell
 
I got it now ... answer lies within over writing the built in macro NextCell()
FYI
Thanks All
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top