Thread: formula or code
View Single Post
  #9   Report Post  
JE McGimpsey
 
Posts: n/a
Default

If PromptPayment is stored in the same workbook, or an add-in, it should
be in a regular code module, not a workbook or worksheet class module
(see

http://www.mcgimpsey.com/excel/modules.html

for more).

If PromptPayment() is stored in another workbook (like Personal.xls)
that needs to be referenced, e.g.:

=IF(G415,Personal.xls!PromptPayment(),"")

In article ,
"Monty" wrote:

If i put this formula =IF(G415,PromptPayment(),"")

with this UDF in a regular code module:

Public Function PromptPayment()
MsgBox "Please issue Prompt Payment Letter"
End Function

it comes up with the following error #NAME?