Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Message boxes in VB 1

Status
Not open for further replies.

hoofit

Technical User
Nov 20, 2005
343
US
Good morning,
Can someone assist with code for a message box that contains the yes - No - Cancel options as vb.net has here

whichButtonDialogResult = MessageBox.Show("Add current values to the total?", _
"Save?", MessageBoxButtons.YesNo, MessageBoxIcon.Question)

Thank you
 
How are ya hoofit . . .

Try the msgbox function:
Code:
[blue]   Dim Msg As String, Style As Integer, Title As String, Rtn
   
   Msg = "Your Text Here"
   Style = vbInformation + vbYesNoCancel
   Title = "Testing"
   Rtn = MsgBox(Msg, Style, Title)
   
   If MsgBox = vbYes Then
      [green]'do this[/green]
   ElseIf MsgBox = vbNo Then
      [green]'do that[/green]
   Else
      [green]'cancel code here[/green]
   End If[/blue]

Calvin.gif
See Ya! . . . . . .
 
alvechurchdata,
Most familiar indeed. That hit the spot! I was wondering when I would hit familiat territory.

Thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top