how to call a macro when click on table cell of word document

A

azam baig

Hi

i am having the tables in the word document.when i click in the table
cell i want to show input box to enter the text and once ok button is
clicked the text entered in the input box should be displayed in the
table cell.

so i have the macro for showing the input box and displaying the text
in the corresponding cell.but i need to call that macro once i click the
table cell.

table cell click macro is available for excel.but it is for word
document

pls tell how this can be possible
your help will be highly appreciated.

thanks in advance and looking for the reply
 
D

Doug Robbins - Word MVP

See the article "Using MacroButton fields" at:

http://www.word.mvps.org/FAQs/TblsFldsFms/UsingMacroButton.htm

However, maybe you should really be using a userform. See the article "How
to create a Userform" at:

http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm

and the following page of fellow MVP Greg Maxey's website :

http://gregmaxey.mvps.org/Create_and_employ_a_UserForm.htm



--
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, originally posted via msnews.microsoft.com
 
F

fumei

It may be useful to consider that a cell in Excel is MUCH different than a
cell in a Word table.

Clicking into a cell in Excel fires an event. Yes, you could use an
application event in Word - Selection_Change - but it would fire every single
time you EVER moved the cursor. Obviously that is not useful for this case.
There is no event specifically for clicking into a Word table cell.

Thus, as mentioned, perhaps a userform may be useful, but more
importantly...why are you doing this? if the user is clicking in a cell in a
Word table, why would you want an inputbox to get text to put in that cell?
They are already there. What are you trying to achieve?
 

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