Sub aTest(Optional answer As String = "Yes", Optional name As String = "Peter")
If answer = "Yes" Then
MsgBox name & " answered the question"
Else
MsgBox name & " has not answered the question"
End If
End Sub
Sub bTest()
Call aTest(, "John")
Call aTest("Yes")
Call aTest("No", "John")
Call aTest
End Sub
Hi Mike
Maybe something like this
Code:Sub aTest(Optional answer As String = "Yes", Optional name As String = "Peter") If answer = "Yes" Then MsgBox name & " answered the question" Else MsgBox name & " has not answered the question" End If End Sub Sub bTest() Call aTest(, "John") Call aTest("Yes") Call aTest("No", "John") Call aTest End Sub
M.
Thanks very much,
Mike