How To Make A VBA Message Box Yes No

 

Continuing on with our VBA message box theme, here is how
to create a “VBA message box yes no”

The message box can be used like a function to return a value.

Here I am going to return a value to determine if the user clicked
“yes” or “no”.

For this I am going to set up a VBA Procedure to test with:

Sub GetReponse()
    
    Dim intChoice As Integer
    
    intChoice = MsgBox("Would you like to proceed?", vbYesNo, "Get Response")

    Select Case intChoice
        Case vbYes
            DoCmd.OpenForm "Yes"
        Case vbNo
            DoCmd.OpenForm "No"
    End Select

End Sub

 

Offsite Related Information:

“Go Fund Me” Page


($5 suggested amount)

(…10% of your gift amount will go to charity)

Free! Subscribe To Our YouTube Channel!

Free MS Access VBA Programming Course

Facebooktwitterredditpinterestlinkedinmailby feather
Tags: , ,