Another way, using Null or Empty argument:
To call your function:
Code:
Function myfunc(arg1,arg2,arg3,arg4)
If IsNull(arg1) OR IsEmpty(arg1)
'ignore arg1
Else
'use arg1
End If
If IsNull(arg2) OR IsEmpty(arg2)
'ignore arg1
Else
'use arg1
End If
.....
'Your code is here
End Function
To call your function:
Code:
Dim a
a = myfunc(NULL,arg2,,arg4)