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 / November 2004

Tip: Looking for answers? Try searching our database.

Identify Cell Location

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tdbcalif - 08 Nov 2004 19:14 GMT
Greetings. I'm new to using VBA for word. I've used for Excel and Access.
How can I refer to the active cell in a Word table.
My Goal:
To use form fields in a word document.
Upon selection of a particular value in the form field list, I want to use
an exit macro to shade the cell that was just changed based on the value that
the user selected.
However, I can't determine with VBA which is the active cell

Any advice would be appreciated.

Thanks
Stephanie Krieger - 08 Nov 2004 23:53 GMT
Hi,

Here's the code you need:

Selection.tables(1).cell(selection.Information
(wdEndOfRangeRowNumber),selection.Information
(wdEndOfRangeColumnNumber)).Select

Hope that helps.

Best,

Stephanie Krieger
author of Microsoft Office Document Designer (from
Microsoft Learning)
email: MODD _ 2003 at msn dot com
blog: arouet.net
>-----Original Message-----
>Greetings. I'm new to using VBA for word. I've used for Excel and Access.
[quoted text clipped - 10 lines]
>Thanks
>.
macropod - 09 Nov 2004 09:50 GMT
Hi,

Try something based on:

Sub CellAddress()
If Selection.Information(wdWithInTable) = True Then
   StatusBar = "Cell Address: " & Chr(64 + Selection.Cells(1).ColumnIndex)
& Selection.Cells(1).RowIndex
End If
End Sub

Cheers
PS: I seem to recall this macro or one like it being published by MS at one
time. It puts the currently-selected cell's address on the status bar.

> Greetings. I'm new to using VBA for word. I've used for Excel and Access.
> How can I refer to the active cell in a Word table.
[quoted text clipped - 8 lines]
>
> Thanks
 
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.