简体   繁体   English

excel用户窗体中的热键组合作为快捷键

[英]Combination of hotkeys as shortcut keys in excel userform

How can we assign shortcut key like ctrl + enter to commandbutton in userform in excel?我们如何在 excel 的用户窗体中将 ctrl + enter 之类的快捷键分配给命令按钮?

You can use the accelerator property of the control.您可以使用控件的加速器属性。 Go to the properties window of the commandbutton and in the accelerator property, enter a letter which exists in the commandbutton caption. Go 到命令按钮的属性 window 并在加速器属性中,输入命令按钮标题中存在的字母。 For example, if the commandbutton caption is "Save", you could put the letter S. You'll notice that the letter S in the word Save on the commandbutton is now underlined.例如,如果命令按钮标题是“保存”,您可以输入字母 S。您会注意到命令按钮上的“保存”一词中的字母 S 现在带有下划线。 The keyboard shortcut for the commandbutton is now Alt+S.命令按钮的键盘快捷键现在是 Alt+S。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM