Problem with a user form command button

D

Diane

I am having trouble with a command button on a user form I created in Word
2007.
I used the instructions from the word.mvps.org website (which were great
BTW) and I get an error message that states:
Comple error:
Method or data member not found
When I click ok Private Sub CommandButton1_Click() is highlighted yellow
and there is a yellow arrow pointing to it. I'm assuming that this means
there is a problem with this particular command but I can't figure out what
it is.
I don't know if it is a problem with using 2007 and older instructions or if
I am just missing something.
Any help would be much appreciated.
Thanks!
 
E

Ed

Hi Diane,

I'm guessing that there's something inside the sub procedure that it doesn't
like.

If you can post the code from the "Private Sub CommandButton1_Click()" line
to the first "End Sub" after the line, someone may be able to help.

Regards.

Ed
 
D

David Sisson

Run it again and when it stops, press F8 to allow the code to run a
step at a time. Keep pressing F8, slowly, until it errors out again.
Sometimes then editor will return to the start of the procedure
instead of stopping at the actual problem.

And, yes, please post the code as Ed suggested.
 

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