在Workbook.Open()中,我对键盘上的每一个字母和所有数字都有一个Application.OnKey。
这些信件打开一个子LetterPress(L as String)
例如字母"a":
Application.OnKey "a", "LetterPress ""a""'"
Sub LetterPress(L as string)
子LetterPress被触发。
数字应该打开一个子NumberPress(N as Integer)。
但是,例如,如果我按0,就会得到错误消息(从瑞典语翻译过来)。
无法运行宏(宏的路径) NumberPress "0“。宏可能在此工作簿中不可用,或者所有宏都被禁用。
这是键“0”的代码:
Application.OnKey "0", "NumberPress ""0""'"
Application.OnKey "{96}", "NumberPress ""0""'"
在一个名为“键盘”的模块中,有一个子程序:Sub NumberPress(N as integer)
我也尝试过:Sub NumberPress(N as string)
发布于 2022-02-22 15:21:28
看起来引用太多了:
Application.OnKey "{96}", "'NumberPress 0'"https://stackoverflow.com/questions/71223763
复制相似问题