I have the following functions:
Public Function SaveExample() As Boolean
&
Private Function ValidateExample (ByVal vlngvariable As Long) As Boolean
I want to be able to call the second function from within the first. But I get:
“Compile error: Argument not optional”
Is what I’m trying to do possible, and if so, what is the correct syntax? I’ve simply tried adding the line:
ValidateExample
Within some of the logic of the first function.
It looks like you should specify a value for parameter
vlngvariable.For example, within the function
SaveExample()callValidateExample(x)wherexis the value thatValidateExampleis expecting.