+ Reply to Thread
Results 1 to 3 of 3

How to get table cell information to reference in vba code

  1. #1
    Registered User
    Join Date
    01-09-2013
    Location
    Houston Texas
    MS-Off Ver
    Excel 2010
    Posts
    9

    Smile How to get table cell information to reference in vba code

    Hi everyone. I have some code I already have used in a couple of spreadsheets that updates a cell with the TODAY() function unless there is an existing date which will then trigger MsgBox. It was easy in excel since I can declare the cell location like A1 for example. I have a Word document that I want to use the code on, but don't know how to reference the specific cell in the table that has been created?

    Thank You,

    Mel

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: How to get table cell information to reference in vba code

    Hi Mel,

    You could use code like:
    Please Login or Register  to view this content.
    As you can see, you need to specify both the table and the row/column references for the cell. To test the cell's contents, you also need to exclude the end-of-cell marker.
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Registered User
    Join Date
    01-09-2013
    Location
    Houston Texas
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: How to get table cell information to reference in vba code

    Thanks a bunch. I actually found the example code by searching for word document model. This has tons of information regarding VBA in word. Thanks for the help!

    Mel

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1