Can someone tell me why if I name a Public Function "NAME", I get a run-time
error when I try to use the Application.Run VBA code in Word 2000?
Application.Run "NAME"
However, if I use Application.Run "NAME1" instead, and rename my function to
"NAME1", it works? My assumption is, you cannot name a function "NAME", for
whatever reason. My simple function is listed below:
Public Function NAME()
MsgBox "Hello"
End Function
Tony_VBACoder - 19 Oct 2005 16:41 GMT
The error I get is:
Run-time error '5863'
Method 'Run' of object '_Application' failed
> Can someone tell me why if I name a Public Function "NAME", I get a run-time
> error when I try to use the Application.Run VBA code in Word 2000?
[quoted text clipped - 10 lines]
>
> End Function
Doug Robbins - Word MVP - 19 Oct 2005 19:00 GMT
I think that it is pretty safe to assume that name is a reserved word.

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> The error I get is:
>
[quoted text clipped - 18 lines]
>>
>> End Function