Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 136,534 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,796 people online right now. Registration is fast and FREE... Join Now!




puting command button in msg box

 
Reply to this topicStart new topic

puting command button in msg box, visual basic

jenny_jeff24ever
23 Aug, 2008 - 03:32 AM
Post #1

New D.I.C Head
*

Joined: 2 Aug, 2008
Posts: 2



hello, to every one ?

anyone her who's willing to help me how to put a <yes><no> command botton in msg box?
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Puting Command Button In Msg Box
23 Aug, 2008 - 05:14 AM
Post #2

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 8,996



Thanked: 125 times
Dream Kudos: 8625
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
To accomplish that use the VB constant vbYesNo as a parameter in the MsgBox. Like this


vb

MsgBox ("Is this what you're looking for??", vbYesNo, "Check It Out")

User is online!Profile CardPM
+Quote Post

RodConnors
RE: Puting Command Button In Msg Box
23 Aug, 2008 - 07:02 AM
Post #3

New D.I.C Head
*

Joined: 20 Aug, 2008
Posts: 7


My Contributions
... and to check which one the user clicked
Dim Ans As Integer
Ans = MsgBox("Are you sure you want to change the Supplier?", vbYesNo)
If Ans = 6 Then 'Yes
KeepOldSupplierID = Me.SupplierID.OldValue
Else ' 7 No
Cancel = True
Me.SupplierID.Undo
Exit Sub
End If

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 10:18PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month