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: 1
Default Quting excel from within application


I've got a very strange problem for which I can't find an explanation.

The application I made quits excel using application.quit. Befor
doing this I check if the workbook was saved and if not save it.


Code
-------------------
'Check if the workbook was saved
If Workbooks(ThisWorkbook.Name).Saved = False Then
'Save this workbook
Workbooks(ThisWorkbook.Name).Save
End If

'Close excel
Application.Qui
-------------------


Using above code I would think that the application would quit withou
asking for it to be saved. Well, it doesn't. Only when I add th
application.displayalerts = false statement will it do so. Afterward
when checking I can't find any differences between a saved and no
saved workbook though. Apart from that, when quiting the applicatio
there's only 1 workbook open.

It becomes weirder when you know that this problem only occurs afte
having done something using the application. The application itself i
basically a database which displays data in textboxes depending upo
certain criteria. It has 2 worksheets being 1 for the data used itsel
and 1 which contains temp data used in the application. Both sheet
though are saved when using the workbooks().save statement.

Could any of you offer an explanation of this strange behavior or migh
have experienced similar before? Is this maybe some sort of bug lik
the usedrange problem?

I use the workaround of setting displayalerts to off now but I woul
really like to know why this happens.

Thanks and best regards,

Leo

--
droopy928g
-----------------------------------------------------------------------
droopy928gt's Profile: http://www.excelforum.com/member.php...fo&userid=3023
View this thread: http://www.excelforum.com/showthread.php?threadid=53771

 
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
difference application.quit & application.close Pierre via OfficeKB.com[_2_] Excel Programming 4 November 8th 05 07:55 PM
Application.GetOpenFilename vs Application.Dialogs(xlDialogsOpen) Paul Martin Excel Programming 5 August 5th 05 04:44 PM
Replace application.RTD property by Application.RTDServers collect John.Greenan Excel Programming 1 July 7th 05 02:05 PM
macro to close excel application other than application.quit mary Excel Programming 1 September 14th 04 03:43 PM
application.quit will not shut off application john Excel Programming 0 January 9th 04 11:29 PM


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

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"