0

I have several class member functions that look very similar:

Public Function ProcessSomething(ByVal X as Currency, ByVal Y as Long) As Boolean

Yet some of these function the IDE is forcing me to use the call statement on and other not.

Can someone give me some understanding here?

Shiva
  • 20,575
  • 14
  • 82
  • 112
garaber
  • 232
  • 3
  • 13

1 Answers1

6

The Call statement is required if you are calling the Function and ignoring the return value, or if you use the (..) brackets.

Example, in the following invokation, we are invoking ProcessSomething but not taking the return Boolean (essentially ignoring it.)

Call ProcessSomething(currencyObj, 1.2345)

If you want to invoke the function and ignore the return value, and still not use Call, then you would invoke it as follows. (notice (...) are missing ).

ProcessSomething currencyObj, 1.2345
Shiva
  • 20,575
  • 14
  • 82
  • 112