L
LEO@KCC
Hi,
Could someone please explain the following behaviour?
The Workbook_BeforeClose event is triggered after the ThisWorkbook.Close
method is called and all lines in the Event sub are executed but the status
bar never actually changes its text, and no exceptions are thrown either.
Add this to the ThisWorkbook module and test:
Sub RunThisMacro()
Application.StatusBar = Rnd
ThisWorkbook.Close
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.StatusBar = "THIS DOES NOT WORK" 'this is executed but it
doesn't actually do anything.
End Sub
Thanks for your insight.
Leo
Could someone please explain the following behaviour?
The Workbook_BeforeClose event is triggered after the ThisWorkbook.Close
method is called and all lines in the Event sub are executed but the status
bar never actually changes its text, and no exceptions are thrown either.
Add this to the ThisWorkbook module and test:
Sub RunThisMacro()
Application.StatusBar = Rnd
ThisWorkbook.Close
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.StatusBar = "THIS DOES NOT WORK" 'this is executed but it
doesn't actually do anything.
End Sub
Thanks for your insight.
Leo