Hi Jock
The code does not work since your are using a variable which has no value
attached.
You may consider amending:
Private Sub CommandButton1_Click()
response = MsgBox("Do you wish to order another item?", _
vbYesNo)
If response = vbYes Then
TextBox3.SetFocus
Else
ThisWorkbook.Close True
End If
End If
End Sub
HTH
Cordially
Pascal
"Jock" a écrit dans le message de news:
...
Code bolow doesn't close the worksheet when 'no' is chosen rather than
yes.
Any ideas?
Private Sub CommandButton1_Click()
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