Reputation: 373
I define my own simple Sub
Sub test1()
MsgBox "Hello"
End Sub
but when I try to reference it in a cell
=test1()
I get the following error prompter:
**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**
I have no named ranges and the macro is runs without problems in the Macro manager window.
**What does this error message mean?
Do I need to name macro in a certain way to be able to use it?**
Upvotes: 0
Views: 2775
Reputation: 107587
Two things:
Upvotes: 1