Try something like the following:
Function Test(Optional X As Variant) As Integer
If IsMissing(X) Then
Test = 0
Else
Test = X + 1
End If
End Function
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"visitor" wrote in message
...
hi,
can anyone advise as to how do i use an optional argument in a
function?
thanks in advance