Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 688

Using vbYesNo in MsgBox

$
0
0
Hello,

I am performing a comparison below and would like to incorporate the vbyesNo. When clicking on yes I would like for the event to continue and No to exit the sub. Been trying different things with no success.

NTGwarn = CDbl(NTG)
NTPwarn = CDbl(NTP)

If NTGwarn < NTPwarn Then
MsgBox "Number of teeth in Gear are less than teeth in Pinion. Do you want to continue?", vbYesNo, "Number of Teeth Error"

NTG.SetFocus
Exit Sub

End If

TIA
David

Viewing all articles
Browse latest Browse all 688

Trending Articles