Re: Array + Input Parameter
Rather than passing fake values, just specify that they should be optional:
Code:
Public Sub MySubroutine(Optional ByRef arrMyArray() As Integer, Optional ByRef lngMyLong As Long)
If you want to, you can even set a value that will be used if nothing is passed:
Code:
Public Sub MySubroutine(Optional ByRef arrMyArray() As Integer, Optional ByRef lngMyLong As Long = -1)
Re: Array + Input Parameter
Arrays can't be optional parameters, but variants can be. Otherwise, agree with suggestion
Code:
Public Sub MySubroutine(Optional ByRef arrMyArray As Variant, Optional ByRef lngMyLong As Long)
If IsMissing(arrMyArray) = False Then
If VarType(arrMyArray) = (vbArray Or vbInteger) Then
' process your array
End If
End If
End Sub