I define an ActiveX component with optional arguments and default values:
Public Function MyMethod(X As Double, Y As Double, _ Optional A As Long = -1, Optional B As Long = -1) As Variant
When I invoke it, specifying the default arguments:
f = actxserver('MyProj.MyComp');f.invoke('MyMethod', 1, 2, 3, 4)
I receive the error message:
??? No method 'MyMethod' with matching signature found for class 'COM.MyProj_MyComp'.
Best Answer