View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
TTN[_3_] TTN[_3_] is offline
external usenet poster
 
Posts: 1
Default Unable to save workbook within WorkbookBeforeClose


Hi,

I'm trying to save the current workbook within the WorkbookBeforeClose
but the file is not saving.

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

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

If Not Wb.saved Then
Wb.Save
Wb.saved =True
End If

End Sub

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

Am I doing something wrong here

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