I have a simple test function fTest2 in VBAProject(PERSONAL.XLSB). I can run it from a spreadsheet by inserting "=PERSONAL.XLSB!fTest2(4)" into a cell. However if I try to do the same thing in VBA using
Dim X
X = Application.Run("PERSONAL.XLSB!fTest2(4)")
I find X = "Error 2015".
What am I doing wrong?
Solved the problem: It should be: X = Application.Run("PERSONAL.XLSB!fTest2", 4)