LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Application.StatusBar not refreshing after ThisWorkbook.Close

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



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting Application.EnableEvents=True after Thisworkbook.Close call John Fuller Excel Programming 3 September 4th 06 02:50 PM
How to reset the Application.StatusBar PCLIVE Excel Programming 7 August 1st 06 05:18 PM
macro to close excel application other than application.quit mary Excel Programming 1 September 14th 04 03:43 PM
ThisWorkbook.close doesn't wokk :( Arnaud.L Excel Programming 9 April 1st 04 08:46 AM


All times are GMT +1. The time now is 10:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"