Searching found code like this
Sub Workbook_Activate()
Application.OnKey "+^{RIGHT}", "YourMacroName"
End Sub
However, when I tried, I got
How to create procedure?
I did this
Sub YourMacroName()
Selection.Copy
Sheets("V").Select
End Sub
Sub Workbook_Activate()
Application.OnKey "+^{RIGHT}", "YourMacroName"
End Sub
Got the same error
What would be correct code? Or where would be tutorial for dummies? Found some examples, but they does not work
I see my tags were modified to excel
and excel-vba
. But I do not use excel. Use Kingsoft Office
Changed Application.OnKey "+^{RIGHT}", "YourMacroName"
to .OnKey Key:="^+M", Procedure:="YourMacroName"
and got
Then changed to OnKey Key:="^+M", Procedure:="YourMacroName"
(removed .
) and got error Named argument not found
. And get selected Key:=