You can call a VBA function exactly like a sub. If you are familiar with other programming languages, you can see a sub like a void function - a function that doesn't return anything.
Basically, there are three ways to call a routine in VBA. The first is valid only for functions:
Function foo(p1 as Variant, p2 as Variant) as Long
(...)
foo = val(p1) + val(p2)
End Function
Sub bar(p1 as Variant, optional p2 as Variant)
(...)
End Sub
' (1) Call the function and do something with the return value
myVar = foo(2, 4)
myVar = foo(3, 5) + foo(4, 6)
myVar = bar(3, 5) ' Obviously not possible, "bar" is a Sub
The second and third are valid for Subs and Functions. Both are equivalent, it's just a matter of taste. It is sometimes claimed that using Call is deprecated, however, I can't find such statement from Microsoft.
foo 2, 4 ' Call the Function
bar 2, 4 ' Call the Sub
' Or use Call
Call foo(2, 4) ' Call the Function
Call bar(2, 4) ' Call the Sub
Note that the following syntax is invalid. Either use Call or omit the parenthesis.
foo(2, 4) ' Syntax error
bar(2, 4) ' Syntax error
If you have a sub or function that takes only 1 parameter, the following syntax is valid, however, the parenthesis have a complete different meaning: It will evaluate the value of the parameter and put it on the stack. This will prevent that the value of a parameter that is called by reference is modified by the routine. You can safely assume that in 99% this is done unintentionally.
The VBA editor shows it by adding a space between the routine name and the parameter:
bar (2)
Using the same syntax for 2 parameters makes it more obvious:
bar (2), (4)