Calling a UDF in VBA

Add-in Express™ Support Service
That's what is more important than anything else

Calling a UDF in VBA
UDF Excel event 
Larry X


Serious Developer


Posts: 34
Joined: 2011-04-22
What is the syntax in VBA for calling a UDF? I ask because I have a UDF which is recognized in a cell formula that is unknown to Excel when I try calling it in VBA. Any help would be much appreciated.
Posted 18 May, 2011 17:01:49 Top
Dmitry Kostochko


Add-in Express team


Posts: 2839
Joined: 2004-04-05
Hi Larry,

You can use the Evaluate method, please see the VBA code sample below:


Public Sub Test()

  MsgBox Evaluate("=GetGlobalVar()")

End Sub
Posted 19 May, 2011 05:34:40 Top