UserForm buttons require 2 clicks

D

donbowyer

I use Win XP & Word 2003

I have 2 userforms in Word associated with macros, which work OK.
They have ComboBoxes and OK & Cancel buttons.
Suddenly all these controls, on both forms, now need two mouse clicks (not a
double-click) to operate them rather than one click which is correct.
Otherwise the forms work OK.
Something must have crept in to cause this, but I can't spot it.
Help please
 
J

Jezebel

It usually means you're switching back and forth between the two forms. If
one form is active, then it takes two clicks to do something on the other:
one to activate the form, the second to do the actual command click. To test
if this is what's happening, put a debug.print statement in the form
activate events. See if it happens after the first and before the second
click.
 
E

EscarHolmez

I have a similar problem, but only 1 UserForm. The form has an 'Apply'
button to update fields in the Word document using VBA code.

After running the 'Apply' code, 2 clicks are required to operate the
first button (e.g. 'OK', 'Cancel').

At the end of the 'Apply' procedure:
- "Me" is back to being the UserForm
- I can set the focus to the 'OK' button
- Calling the UserForm_Apply event does not help

How can I make the UserForm active so it only takes 1 click to operate
buttons?
 
J

Jezebel

You shouldn't need to set the focus away from the form to update fields. Are
you using the Selection object, perhaps? -- if so, fix your code so you
don't.
 

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