AcousticalConsultant
Technical User
Ok here's yet another question...
When the user closes the spreadsheet, I don't want excel to ask me if I want to save my changes. What I tried was this:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Workbooks("myWorkbook.xls".Close (False)
End Sub
but the problem with this is that I'm closing the workbook before Excel does. So once this module is finished, Excel can't find my workbook that it was asked to close! So I end up getting an illegal operation and Excel closes.
How can I get around this?
Thanks for the help!
Pascal
When the user closes the spreadsheet, I don't want excel to ask me if I want to save my changes. What I tried was this:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Workbooks("myWorkbook.xls".Close (False)
End Sub
but the problem with this is that I'm closing the workbook before Excel does. So once this module is finished, Excel can't find my workbook that it was asked to close! So I end up getting an illegal operation and Excel closes.
How can I get around this?
Thanks for the help!
Pascal