Color parameter as optional in a function

  • Thread starter Thread starter Crirus
  • Start date Start date
C

Crirus

I need to set a parameter for a function as optional and color... how can I
do that, because seems I cant set structure as optional parameter
 
You could use a ParamArray or you could use

Sub ThisSub( y As Integer, Optional y As String = "Default Value")
MessageBox.Show("DA is: " & Y)
End Sub


Regards - OHM
 
Or you could overload the function definition.

Public function thisFunc(x as string, y as integer, z as structure)

end func

Public function thisFunc(x as string, y as integer)

end func

Rigga.
 
Back
Top