Shortcut keys and UserForm

C

Cerberus

I want to use a shortcut key (Ctrl+z) to activate a UserForm but don't know
for sure it is possible or how to go about it. I've always used a Command
Button or a _Click() in the past. Any ideas on how to go about this? Thanks
in advance.
 
J

Jay Freedman

In order to display a userform, you have to call its .Show method from a
regular macro. To make a shortcut, then, you make a shortcut for the macro
(http://www.word.mvps.org/FAQs/Customization/AsgnCmdOrMacroToHotkey.htm),
not for the userform itself.

Be aware that by default the Ctrl+Z shortcut is already assigned to the Undo
command, so you might want to pick a different one.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
C

Cerberus

Thank you Jay!

Jay Freedman said:
In order to display a userform, you have to call its .Show method from a
regular macro. To make a shortcut, then, you make a shortcut for the macro
(http://www.word.mvps.org/FAQs/Customization/AsgnCmdOrMacroToHotkey.htm),
not for the userform itself.

Be aware that by default the Ctrl+Z shortcut is already assigned to the Undo
command, so you might want to pick a different one.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.



.
 

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