Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Application.Quit closes Excel. Is there an equivalent that
just closes the Workbook ? Thanks - Kirk |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Activeworkbook.close You may be prompted to save changes and if you don't want that use Application.displayalerts=false or you can save automatically ActiveWorkbook.Close savechanges:=True Mike "kirkm" wrote: Application.Quit closes Excel. Is there an equivalent that just closes the Workbook ? Thanks - Kirk |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Fri, 17 Oct 2008 00:55:00 -0700, Mike H
wrote: Hi, Activeworkbook.close Thanks Mike, that did work but had an odd side effect. If I open the workbook again, none of the double click events work. (Until I close and Open Excel again). These usually fire 'Private Sub Worksheet_BeforeDoubleClick'. but this is completly bypassed somehow. I wonder why, any idea? Thanks - Kirk |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Fri, 17 Oct 2008 00:55:00 -0700, Mike H
wrote: Hi, Activeworkbook.close Thanks Mike, that did work but had an odd side effect. If I open the workbook again, none of the double click events work. (Until I close and Open Excel again). These usually fire 'Private Sub Worksheet_BeforeDoubleClick'. but this is completly bypassed somehow. I wonder why, any idea? Thanks - Kirk |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It sounds like your disabling events somewhere when you close this book and
they remain disabled until the application is closed and re-opened. I suspect you have other code somwhere in this book. Mike "kirkm" wrote: On Fri, 17 Oct 2008 00:55:00 -0700, Mike H wrote: Hi, Activeworkbook.close Thanks Mike, that did work but had an odd side effect. If I open the workbook again, none of the double click events work. (Until I close and Open Excel again). These usually fire 'Private Sub Worksheet_BeforeDoubleClick'. but this is completly bypassed somehow. I wonder why, any idea? Thanks - Kirk |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The example you gave with turning display alerts off may have been used; use
the activeworkbook.close savechanges:=true example instead. Take out the application.displayalerts=false line. You can also use ThisWorkbook instead of ActiveWorkbook to narrow it down to the workbook containing the macro. -- I am running on Excel 2003, unless otherwise stated. Please rate posts so we know when we have answered your questions. Thanks. "Mike H" wrote: It sounds like your disabling events somewhere when you close this book and they remain disabled until the application is closed and re-opened. I suspect you have other code somwhere in this book. Mike "kirkm" wrote: On Fri, 17 Oct 2008 00:55:00 -0700, Mike H wrote: Hi, Activeworkbook.close Thanks Mike, that did work but had an odd side effect. If I open the workbook again, none of the double click events work. (Until I close and Open Excel again). These usually fire 'Private Sub Worksheet_BeforeDoubleClick'. but this is completly bypassed somehow. I wonder why, any idea? Thanks - Kirk |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Stopping display alerts will have no impact on events
"Orion Cochrane" wrote: The example you gave with turning display alerts off may have been used; use the activeworkbook.close savechanges:=true example instead. Take out the application.displayalerts=false line. You can also use ThisWorkbook instead of ActiveWorkbook to narrow it down to the workbook containing the macro. -- I am running on Excel 2003, unless otherwise stated. Please rate posts so we know when we have answered your questions. Thanks. "Mike H" wrote: It sounds like your disabling events somewhere when you close this book and they remain disabled until the application is closed and re-opened. I suspect you have other code somwhere in this book. Mike "kirkm" wrote: On Fri, 17 Oct 2008 00:55:00 -0700, Mike H wrote: Hi, Activeworkbook.close Thanks Mike, that did work but had an odd side effect. If I open the workbook again, none of the double click events work. (Until I close and Open Excel again). These usually fire 'Private Sub Worksheet_BeforeDoubleClick'. but this is completly bypassed somehow. I wonder why, any idea? Thanks - Kirk |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Application.Quit Does not Close the Application | Excel Programming | |||
Application.quit | Excel Programming | |||
difference application.quit & application.close | Excel Programming | |||
macro to close excel application other than application.quit | Excel Programming | |||
application.quit will not shut off application | Excel Programming |