Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Messagr
Private Sub CommandButton1_Click()
"Do some stuff and then-" MsgBox("Do you wish to order another item?", _ vbYesNo) If response = vbYes Then If vbYes Then TextBox3.SetFocus Else ThisWorkbook.Close True End If End If End Sub -- tia Jock |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Messagr
You need to store the result of MsgBox and test the result.
Dim Res As VbMsgBoxResult Res = MsgBox("Whatever", vbYesNo) If Res = vbYes Then ' user clicked 'Yes' Else ' user clicked 'No' End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting www.cpearson.com (email on the web site) "Jock" wrote in message ... Private Sub CommandButton1_Click() "Do some stuff and then-" MsgBox("Do you wish to order another item?", _ vbYesNo) If response = vbYes Then If vbYes Then TextBox3.SetFocus Else ThisWorkbook.Close True End If End If End Sub -- tia Jock |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|