Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Shortcut key and UserForm

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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 489
Default Shortcut key and UserForm

I wouldn't recommend using Ctrl + z, because that is the undo method for
Office. Your users may not like that.
--
Cheers,
Ryan


"Cerberus" wrote:

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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Shortcut key and UserForm

As Ryan Says, probably best not to use Ctrl Z.

Try the following in the open/close events to add/remove a shortcut for
Shift-Ctrl-Z, to call your macro that shows the form

Sub auto_Open()
Application.OnKey "+^Z", ThisWorkbook.Name & "!ShowFrmMyStuff"
End Sub

Sub Auto_Close()
Application.OnKey "+^Z"
End Sub

Sub ShowFrmMyStuff()
UserForm1.Show
End Sub

Regards,
Peter T

"Cerberus" wrote in message
...
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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assign shortcut to button on userform MarMo Excel Programming 2 October 24th 06 02:22 PM
Macro Shortcut Key Conflicts with Application Shortcut Keys Jordan Hotzel Excel Programming 0 October 13th 06 06:39 AM
Macro Shortcut Key Conflicts with Application Shortcut Keys Jordan Hotzel Excel Programming 0 October 13th 06 06:39 AM
Userform button - shortcut key? MattShoreson[_107_] Excel Programming 2 May 15th 06 04:25 PM
how to send a workbook shortcut as attachement in an e-mail from a userform Valeria[_2_] Excel Programming 5 January 22nd 04 12:02 PM


All times are GMT +1. The time now is 10:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"