Thursday, January 19, 2017

Yes No buttons

Sometimes you need the user to answer Yes or No in order to carry out a function. This usually happens when you need the user decide if the user wants to carry on with a posting entry.

Dim LResponse As Integer

LResponse = MsgBox("Do you wish to continue?", vbYesNo, "Continue")

If LResponse = vbYes Then
   {...statements...}
Else
   {...statements...}
End If

No comments:

Post a Comment