S
sashi
Hi
I am trying to handle WorkbookBeforeClose event to close a
workbook, the sample code looks like below
Private Sub App_WorkbookBeforeClose(ByVal Wb As
Excel.Workbook, Cancel As Boolean)
App.EnableEvents = False
Wb.Close savechanges:=False
App.EnableEvents = True
End Sub
steps to crash
1. create a workbook with the above code
2. select enable macros option when prompted
3. create a new work book and type something
4. close new workbook
5. select No when prompted to save changes
6. try to scroll the workbook
Excel97 crashes
it will be very helpful if anybody can throw some light on
this. thanks
I am trying to handle WorkbookBeforeClose event to close a
workbook, the sample code looks like below
Private Sub App_WorkbookBeforeClose(ByVal Wb As
Excel.Workbook, Cancel As Boolean)
App.EnableEvents = False
Wb.Close savechanges:=False
App.EnableEvents = True
End Sub
steps to crash
1. create a workbook with the above code
2. select enable macros option when prompted
3. create a new work book and type something
4. close new workbook
5. select No when prompted to save changes
6. try to scroll the workbook
Excel97 crashes
it will be very helpful if anybody can throw some light on
this. thanks