ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   unable to save current workbook within WorkbookBeforeClose (https://www.excelbanter.com/excel-programming/283100-unable-save-current-workbook-within-workbookbeforeclose.html)

TTN

unable to save current workbook within WorkbookBeforeClose
 

I am trying to save the current workbook within
WorkbookBeforeClose, but the workbook is not saving.


Is this a bug?
And how do I workaround this

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com


Don Guillett[_4_]

unable to save current workbook within WorkbookBeforeClose
 
As always, Post your code

--
Don Guillett
SalesAid Software

"TTN" wrote in message
...

I am trying to save the current workbook within
WorkbookBeforeClose, but the workbook is not saving.


Is this a bug?
And how do I workaround this?


------------------------------------------------
~~ Message posted from
http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/




libby

unable to save current workbook within WorkbookBeforeClose
 
What code are you using?

it should be

ThisWorkbook.save

-----Original Message-----

I am trying to save the current workbook within
WorkbookBeforeClose, but the workbook is not saving.


Is this a bug?
And how do I workaround this?


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from

http://www.ExcelForum.com/

.


Ron de Bruin

unable to save current workbook within WorkbookBeforeClose
 
Try this

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Save
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"TTN" wrote in message ...

I am trying to save the current workbook within
WorkbookBeforeClose, but the workbook is not saving.


Is this a bug?
And how do I workaround this?


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/




TTN[_2_]

unable to save current workbook within WorkbookBeforeClose
 

The WorkbookBeforeClose is an application level event in my com addi
with the following signatur

Private Sub Excel_WorkbookBeforeClose(ByVal Wb As Excel.Workbook
Cancel As Boolean)

Wb.Save

End Sub



Calling the Wb.Save should save the workbook, but it didn't

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com