Call function in another function

In the VBA compiler I call another function also inside the VBA compiler.
I do not get errors when compiling. I get the following error, but do not understand what is wrong.


The compiler tells you there is an error in the VBA code. Check at the position indicated (9, 53).

I really do not know what is wrong.
This is the line:
sheettest = Application.testSheetName(WName)

testSheetName is another function that is also in the VBA compiler.

Then if this is a function already in the compiler just invoke it without Application.

sheettest = testSheetName(WName)

The compiler will recognize the function

Without “Application” then compiler says “unknown method or routine: ‘tesetSheetName’”.

Make sure the testSheetName is declared before the call to it.

1 Like