Function Returning Boolean?
I suspect you may be using VBScript instead of VBA? If that's the case then VBScript doesn't state Type
this will work in VBScript
dim test,btest = 1b=falsemsgbox ("Calling proc before function test=" & test)msgbox("Calling proc before function b=" & b)b = A(test)msgbox ("Calling proc after function test=" & test)msgbox("Calling proc after function b=" & b)Function A(test)test = test +1 A=trueEnd Function
or in your example
Function A() A=trueEnd Function