Simple msg box (1 Viewer)

crownedzero

Registered User.
Local time
Today, 13:56
Joined
Jun 16, 2009
Messages
54
I'm pretty sure I've seen this one but for some reason the forum search isn't returning what I'm looking for.

Just looking for a simple msgbox. I have a button that runs a query and exports it. I'd like to insert a Yes/No msg box, if the user clicks yes the query is run and exported, if the user clicks no then it cancels.

Thanks in advance.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 11:56
Joined
Aug 30, 2003
Messages
36,129
Code:
Dim msg As String, button As Variant, title As String, response As Variant
msg = "Vehicle is Shopped - Do you want to dispatch anyway?"
button = vbYesNo + vbDefaultButton2
title = "Vehicle Shopped!"

response = MsgBox(msg, button, title)
If response = vbYes Then
  'what to do if yes
Else
  'what to do if not
End If
 

Simon_MT

Registered User.
Local time
Today, 19:56
Joined
Feb 26, 2007
Messages
2,177
You can create your own Dialog Form and customise it how you like.

Simon
 

Users who are viewing this thread

Top Bottom