MACRO LIBRARY

Lesson 1.6 - MsgBox function

Free public access. No account or subscription required.

Files

Lesson 1.6 - MsgBox function

Code

'Dim retval As Integer
    
Sub main()
    'retval = MsgBox("This is a message box.", vbYesNo)
    If MsgBox("This is a message box.", vbYesNo) = vbYes Then
        MsgBox "You said yes!"
    Else
        MsgBox "You said no!"
    End If
End Sub