LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
Abs
 
Posts: n/a
Default Closing Excel without saving

Hi
Attached is a procedure I wrote to close excel when a certain criteria was
not met. However I still get the default message box "Save changes". I want
the procedure to select the 'Don't Save' option and then Quit Excel. Any help
would be welcome.

Private Sub OptionButton6_Click()
Dim Response As String
Dim msg As String
Dim Style As String

msg = "Financial Support (Level 2 as in Studybank Guidelined) is not
available to you. Do you want to apply for Study Leave Only(Level One
Support)?"
Style = vbYesNo
Response = MsgBox(msg, Style)
If Response = vbNo Then
MsgBox "You will be logged out"
ActiveWorkbook.Close savechanges:=False
Application.Quit
Else
Range("b10.j10").Select
Endif
Endsub
 
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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
unhide menu bar in excel - just disappeared Sean Setting up and Configuration of Excel 12 April 4th 23 10:19 AM
TRYING TO SET UP EXCEL SPREADSHEET ON MY COMPUTER MEGTOM New Users to Excel 5 October 27th 05 03:06 AM
Saving a Excel 97 file into Excel 2003 file Wil Excel Discussion (Misc queries) 1 December 13th 04 11:51 PM
Opening and saving Excel 2003 file from Excel 97. Rodrigo Excel Discussion (Misc queries) 2 December 12th 04 02:17 PM


All times are GMT +1. The time now is 07:51 AM.

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

About Us

"It's about Microsoft Excel"