PC Review


Reply
Thread Tools Rate Thread

Application Status Bar circular

 
 
=?Utf-8?B?SkIyMDEw?=
Guest
Posts: n/a
 
      10th Apr 2007
Hi


I have three messages that come up on the Application Status Bar for a few
seconds each & then move on to the next one in a loop. They start when the
sheet is opened up & i want them to close when the sheet closes down. The
problem i have with my current code is that when i try to close the sheet
down it automatically reopens the sheet to carry on playing the loop of
messages! I have tried using all sorts of things that should fire macros
before i close the sheet but to no avail.

can someone tell me where i am going wrong, the PrivateSubWorkbook's just
dont seem to want to interupt my rather primative loop?


here are all the PrivateSubWorkbook's that ive use to try to control the
loop with:

-----------------------------------------------

Private Sub Workbook_Open()
Application.StatusBar = "Text in here"
Application.OnTime Now + TimeSerial(0, 0, 5), "LineB"
End Sub

Private Sub Workbook_Deactivate()
Application.StatusBar = False
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.StatusBar = False
End Sub

Private Sub Workbook_WindowDeactivate(ByVal Wn As Window)
Application.StatusBar = False
End Sub

---------------------------------------
....& here is the loop of messages...
---------------------------------------

Sub LineA()
Application.StatusBar = "Text in here "
Application.OnTime Now + TimeSerial(0, 0, 5), "LineB"
End Sub

Sub LineB()
Application.StatusBar = "More text in here"
Application.OnTime Now + TimeSerial(0, 0, 5), "LineC"
End Sub

Sub LineC()
Application.StatusBar = "Even more text in here"
Application.OnTime Now + TimeSerial(0, 0, 5), "LineA"
End Sub

---------------------------------------------


as always, any help gratefully recieved, let me know if you need more info

cheers

jb
 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      10th Apr 2007
Chip Pearson explains how to use application.ontime:
http://www.cpearson.com/excel/ontime.htm

Take particular note of the way Chip uses a public variable (runwhen) to kill
the next scheduled run.

JB2010 wrote:
>
> Hi
>
> I have three messages that come up on the Application Status Bar for a few
> seconds each & then move on to the next one in a loop. They start when the
> sheet is opened up & i want them to close when the sheet closes down. The
> problem i have with my current code is that when i try to close the sheet
> down it automatically reopens the sheet to carry on playing the loop of
> messages! I have tried using all sorts of things that should fire macros
> before i close the sheet but to no avail.
>
> can someone tell me where i am going wrong, the PrivateSubWorkbook's just
> dont seem to want to interupt my rather primative loop?
>
> here are all the PrivateSubWorkbook's that ive use to try to control the
> loop with:
>
> -----------------------------------------------
>
> Private Sub Workbook_Open()
> Application.StatusBar = "Text in here"
> Application.OnTime Now + TimeSerial(0, 0, 5), "LineB"
> End Sub
>
> Private Sub Workbook_Deactivate()
> Application.StatusBar = False
> End Sub
>
> Private Sub Workbook_BeforeClose(Cancel As Boolean)
> Application.StatusBar = False
> End Sub
>
> Private Sub Workbook_WindowDeactivate(ByVal Wn As Window)
> Application.StatusBar = False
> End Sub
>
> ---------------------------------------
> ...& here is the loop of messages...
> ---------------------------------------
>
> Sub LineA()
> Application.StatusBar = "Text in here "
> Application.OnTime Now + TimeSerial(0, 0, 5), "LineB"
> End Sub
>
> Sub LineB()
> Application.StatusBar = "More text in here"
> Application.OnTime Now + TimeSerial(0, 0, 5), "LineC"
> End Sub
>
> Sub LineC()
> Application.StatusBar = "Even more text in here"
> Application.OnTime Now + TimeSerial(0, 0, 5), "LineA"
> End Sub
>
> ---------------------------------------------
>
> as always, any help gratefully recieved, let me know if you need more info
>
> cheers
>
> jb


--

Dave Peterson
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Circular or semi-circular chart DKS Microsoft Excel Charting 3 3rd Nov 2009 01:50 PM
How can I set my application in the status area? =?Utf-8?B?S3VuIE5pdQ==?= Microsoft VC .NET 4 22nd Dec 2005 06:14 AM
System Agent Status and application Agent status misleading manny Spyware Discussion 0 10th Jan 2005 01:26 AM
Application status John Microsoft Excel Programming 1 22nd Mar 2004 03:28 PM
Application status John Microsoft Excel Programming 1 21st Mar 2004 03:20 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:12 PM.