If AdultCanoeing.Value < 1 Then 'And AdultTennis.Value And AdultWaterSkiing.Value And AdultWindSurfing.Value < 1 Then
MsgBox(" No Extras selected,Do you want Extras", MsgBoxStyle.YesNo)
If MsgBoxResult.Yes Then Form1.Visible = True
Else ' MsgBoxResult.No Then
MsgBox("proceed to next page")
End If
message box codemessage box NO not executing
Page 1 of 1
4 Replies - 2925 Views - Last Post: 21 December 2010 - 05:46 AM
#1
message box code
Posted 18 December 2010 - 04:06 PM
yes/no message box used but No response does not execute properly and gives the same response as Yes selection.
Replies To: message box code
#2
Re: message box code
Posted 18 December 2010 - 04:09 PM
kadiaReid, PLEASE STOP posting VB.NET code in the VB6 forum! Your code is VB.NET, NOT VB6!!! Post in the VB.NET Forum.
Moved to VB.NET.
Moved to VB.NET.
#3
Re: message box code
Posted 18 December 2010 - 04:11 PM
I'm very sorry, saw your post after posting this one. any help please
#4
Re: message box code
Posted 18 December 2010 - 04:55 PM
From 18 December 2010 - 11:06 PM:
yes/no message box used but No response does not execute properly and gives the same response as Yes selection.
If AdultCanoeing.Value < 1 Then 'And AdultTennis.Value And AdultWaterSkiing.Value And AdultWindSurfing.Value < 1 Then
MsgBox(" No Extras selected,Do you want Extras", MsgBoxStyle.YesNo)
If MsgBoxResult.Yes Then Form1.Visible = True
Else ' MsgBoxResult.No Then
MsgBox("proceed to next page")
End If
kadiaReid:
1. The symbol ' indicates that what follows to the end of the line is a commment.
2. If don't store the resultant reply of the messagebox, you can't then write code based on it reply. Eg
MsgBox(" No Extras selected,Do you want Extras", MsgBoxStyle.YesNo)
If MsgBoxResult.No Then
' do stuff based on an reply of No
End If
Use MessageBox instead and DialogResult
Dim reply As DialogResult = MessageBox.Show(" No Extras selected,Do you want Extras", "", MessageBoxButtons.YesNo)
If reply = DialogResult.No Then
' do stuff based on a reply of No
End If
#5
Re: message box code
Posted 21 December 2010 - 05:46 AM
Thanks for your help well appreciated.
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote





|