I have what seems an innocuous bit of VBA code.
Private Sub App_WorkbookBeforeSave(ByVal WB As Workbook, ByVal
SaveAsUI As Boolean, Cancel As Boolean)
Dim wbName As String
wbName = WB.name
Set WB = Nothing
getLog().wDebug "re requesting WB with no modules(" & wbName & ")"
Set WB = Application.Workbooks(wbName)
getLog().wDebug "Saving Changes(" & WB.name & ")"
Cancel = True
getLog().wDebug "ENDING overloaded before save event for (" &
WB.name & ")"
This catches the event of saving a worksheet.
But on the '.save'
method excel goes into a flat spin and creates a
massive temporary file that continues to grow until excel dies
In my log file I see this
DEBUG-26/09/2007 14:33:36-thmedlan-re requesting WB with no
Which seems to suggest the '.save' method is to blame. I have taken
the stack trace of what excel was doing at the time. Does anyone have
any ideas as to what I am doing wrong? and why workbook.save behaves