Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next xl.displayalerts = False wbk.save wbk.Close Set xl = Nothing End Sub You'll find this more efficient... Private Sub Form_Unload(Cancel As Integer) On Error Resume Next xl.wbk.Close False '//no changes so don't save xl.Quit: Set wbk = Nothing: Set xl = Nothing End Sub ...because it cleans up VB6 properly AND doesn't leave Excel running with DisplayAlerts turned off! (Closing a workbook and specifying the SaveChanges arg effectively cancels the "Do you want to save..." alert!) -- Garry Free usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Embedding a pie chart from excel | Charts and Charting in Excel | |||
Embedding an annotation or a comment to a chart in Excel 2007 | Charts and Charting in Excel | |||
Embedding spreadsheet in a user form | Excel Discussion (Misc queries) | |||
Can I scan an existing paper form into excel | Excel Discussion (Misc queries) | |||
Embedding excel charts in my C# windows form | Charts and Charting in Excel |