Function fullName2(strName As String, Optional strMName As String = "java2s", Optional strLName As String)
msgBox strName
msgBox strMName
msgBox strLName
End Function
Sub getName2()
Dim strFirstName As String
Dim strLastName As String
Dim strFullName As String
strFirstName = "First"
strLastName = "Last"
msgBox fullName2(strMName:="E", strLName:="Smith", strFname:="John")
msgBox fullName2(strFname:="John")
End Sub
|