Optional Arguments

C

CLSWL

I have the following public function

Public Function Repeats(Combo As ComboBox, Combo1 As ComboBox, Optional
Combo2 As ComboBox)

It works fine when all the arguments are there, but i don't know what to do
when an argument is missing.

How do I capture the fact that there is no assigned value for Optional Combo2?
I have tried Combo2.value=Nothing , IsNull(Combo2.Value)=true, ...
What do you suggest.

I would like to do this so that i can say
If Combo2 doesn't have a value
Exit function
end if
 
P

Perry

Function testing123(optional mycombo as comboBox = nothing) as Integer
If seccombo is nothing then
Msgbox "No combo entered"
End if
End function

Krgrds,
Perry
 
C

CLSWL

"Is Nothing"... wow, thankyou.
--
-CLSWL


Perry said:
Function testing123(optional mycombo as comboBox = nothing) as Integer
If seccombo is nothing then
Msgbox "No combo entered"
End if
End function

Krgrds,
Perry
 
Top