Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2006

Tip: Looking for answers? Try searching our database.

determine table cell value

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JerryMB - 18 Jan 2006 21:42 GMT
I have done vba in access and excel but in word I can't seem to get this
right probably because it is right in front of my face.

How do I use the value from a word table cell in a macro?

The value of cell (1,1) will determine an action on cell(1,2) of table(1)
and the value of Cell (1,1) needs to be displayed in a msgbox.

Signature

JerryB

YiShusen@gmail.com - 18 Jan 2006 22:50 GMT
hope this will help you
http://www.jojo-zawawi.com/code-samples-pages/code-samples.htm#T
JerryMB - 19 Jan 2006 01:05 GMT
Thanks but if what I was looking for was there I didn't see it.  But looking
through it I found an answer to a borders question for a different project
--Thanks
Signature

JerryB

> hope this will help you
> http://www.jojo-zawawi.com/code-samples-pages/code-samples.htm#T
JerryMB - 19 Jan 2006 01:22 GMT
Found it in a earlier discussion - must be my bad search technique

myString = ActiveDocument.Table(1).Cell(2,2).Range.Text

Signature

JerryB

> I have done vba in access and excel but in word I can't seem to get this
> right probably because it is right in front of my face.
[quoted text clipped - 3 lines]
> The value of cell (1,1) will determine an action on cell(1,2) of table(1)
> and the value of Cell (1,1) needs to be displayed in a msgbox.
Doug Robbins - Word MVP - 19 Jan 2006 05:09 GMT
That will include the end of cell marker in myString.  To exclude it, use

Dim myrange as Range
Set myrange = ActiveDocument.Tables(1).Cell(2, 2).Range
myrange.End = myrange.End - 1
MsgBox myrange

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> Found it in a earlier discussion - must be my bad search technique
>
[quoted text clipped - 7 lines]
>> The value of cell (1,1) will determine an action on cell(1,2) of table(1)
>> and the value of Cell (1,1) needs to be displayed in a msgbox.
JerryMB - 20 Jan 2006 02:13 GMT
Thanks Doug that is cleaner than the method I used -- Basicly
strMystr2= Mid(strMystr,1,(Len(strMystr)-2)
Signature

JerryB

> That will include the end of cell marker in myString.  To exclude it, use
>
[quoted text clipped - 14 lines]
> >> The value of cell (1,1) will determine an action on cell(1,2) of table(1)
> >> and the value of Cell (1,1) needs to be displayed in a msgbox.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.