vba call function with parameters

VBA Function Call, Return Value, & Parameters. You can create a Function with multiple arguments and pass the values to the Function by way of a Sub Procedure. Function CalculateDayDiff (Date1 as.

VBA Function Call, Return Value, & Parameters
VBA Function Call, Return Value, & Parameters from www.automateexcel.com

To use the return value of a function, assign the function to a variable and enclose the arguments in parentheses, as shown in the following example. VB Answer3 = MsgBox.