LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 440
Default Message box & close worksheet

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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Close Message box after 3 seconds blackbox via OfficeKB.com Excel Programming 8 June 21st 07 03:00 PM
Automatically close a message box ed Excel Programming 3 October 31st 06 05:58 PM
Warning message on file close Lambtwo Excel Worksheet Functions 1 October 25th 05 03:31 AM
Force a Message Box to close unanswered jennie Excel Programming 1 October 12th 05 10:23 AM
Close a message box Nigel Excel Programming 1 September 15th 05 12:49 AM


All times are GMT +1. The time now is 07:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"