Excel 如何将键盘快捷键添加到已手动编码的VBA模块?
以下是前几行代码:Excel 如何将键盘快捷键添加到已手动编码的VBA模块?,excel,vba,keyboard-shortcuts,Excel,Vba,Keyboard Shortcuts,以下是前几行代码: Sub OpenFile() Dim myFile As String Dim Wb As Workbook myFile = Application.GetOpenFilename("CSV Files (*.csv), *.csv") 'Exit if no file selected If myFile = "False" Then MsgBox "No file selected!"
Sub OpenFile()
Dim myFile As String
Dim Wb As Workbook
myFile = Application.GetOpenFilename("CSV Files (*.csv), *.csv")
'Exit if no file selected
If myFile = "False" Then
MsgBox "No file selected!"
Exit Sub
End If
'Open the file
End Sub
我试着模仿我录制的其他宏中的命令行,但似乎没有任何效果。请告知。我应该把指定键盘快捷键的代码放在哪里?在本例中,我希望快捷键为CTRL+SHIFT+R
谢谢大家! 从工作表中,触摸Alt+F8然后触摸选项…
然后指定快捷方式 请参阅可能的副本