I thought I had the correct syntax to detect if a parameter has been passed.
I have the following method which accept a parameter and I would like to know if the parameter was passed.
Sub Cleanup(Optional tnError As Integer)
' If we pass a parameter
If VarType(tnError) = 2 Then
lnLastError = tnError
End If
But, this is not working because even if the tnError is not passed, the type is still integer.