Detecting if data in table has changed

D

dave.cuthill

Is there a way of detecting if a change has been made to data in a
table and then fire a macro? If so how is this best done. I am trying
to update an excel chart that is based on a table in the document as
the table changes. I have tried to link the table to the excel object
but this does not seem to work so I thought maybe I could determine
when the table changed and then update the excel chart at those
instances.


David
 
C

Cindy M -WordMVP-

Is there a way of detecting if a change has been made to data in a
table and then fire a macro? If so how is this best done. I am trying
to update an excel chart that is based on a table in the document as
the table changes. I have tried to link the table to the excel object
but this does not seem to work so I thought maybe I could determine
when the table changed and then update the excel chart at those
instances.
Hmmm. You could link a MS Graph to a table in Word. MS Graph uses the
same charting engine as Excel, but not the excel sheet as the data
source. It does support linking a Word table to its internal data sheet
(OLE).

Other than that, the big question is: what can trigger this check and
update. Word doesn't have any "key press" or other events that execute
when one types. Closest would be the WindowSelectionChange event that
will trigger as soon as a user moves between cells, into or out of, a
table.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top