我定义了自己的简单Sub
Sub test1()
MsgBox "Hello"
End Sub
但是当我尝试在单元格中引用它时
=test1()
我收到以下错误提示:
**The name that you entered is not valid
Reason for this:
1) The name does not begin with a letter or underscore
2) The name contains a space or other invalid character
3) The name conflicts with a Excel built in name or name of another object in the workbook**
我没有命名范围,宏在宏管理器窗口中运行没有问题。
**此错误消息的含义是什么?
我是否需要以某种方式命名宏以便能够使用它?**
答案 0 :(得分:1)
两件事: