Button onclick event wont' run

R

Rick B

Hello and thanks for your time. I am pretty good with Access vba, but not
so handy in Word.

I have a picture in my document that is basically a chart. I put several
very small buttons on top of this picture. I would like for my users to be
able to click one, and have a messagebox appear with details.

I added the following....

Private Sub CommandButton1_Click()
Msgbox ("test")
End Sub

When I click the button, nothing happens.

Can anyone shed some light here?

Thanks!!

Rick B
 
J

Jean-Guy Marcil

Rick B was telling us:
Rick B nous racontait que :
Hello and thanks for your time. I am pretty good with Access vba,
but not so handy in Word.

I have a picture in my document that is basically a chart. I put
several very small buttons on top of this picture. I would like for
my users to be able to click one, and have a messagebox appear with
details.

I added the following....

Private Sub CommandButton1_Click()
Msgbox ("test")
End Sub

When I click the button, nothing happens.

Works fine over here (Word 2003).
Are you still in design mode?

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
R

Rick B

Note:

I was able to do basically the same thing in a new document on a different
computer, and it worked great! Does that help any?

Rick B
 
R

Rick B

I think we found it.

We closed the document, reopened it, answered "yes" when it asked us if we
wanted to allow the running of scripts, and then it worked.

Guess the security settings on medium were throwing us off.

Rick B
 
J

Jean-Guy Marcil

Rick B was telling us:
Rick B nous racontait que :
I think we found it.

We closed the document, reopened it, answered "yes" when it asked us
if we wanted to allow the running of scripts, and then it worked.

Guess the security settings on medium were throwing us off.
That's right, you have to allow Word to run macros for these buttons to
work.
Glad you found it!

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

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

Similar Threads


Top