Type mismtach on external name

Hi I have script library with a function.

In my form, in the onSubmit event I call a function that should return a value of type integer:

so on the declarations of my form i put:

Dim myValue As Integer

in the onSubmit event:

myValue = myFunction(para1, para2, para3)

myFunction is a function within myScriptLibrary

Public Function myFunction(para1 as string, para2 as integer, para3 as double) as Integer

'code for function

'etc…

myfunction = 1

End function

When i debug it hits this line in the onSubmit event of the form:

myValue = myFunction(para1, para2, para3)

with the error message: type mismtach on external name

myValue has been declared as an Integer, so has myFunction and myFunction is returning an integer (1). So what am I doing wrong here?

Thanks

Subject: type mismtach on external name

sometimes if the script library is saved after the code blocks this may occur,

Save the onSubmit event, make a change, save the code and try again.