Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Application Status Bar circular

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Application Status Bar circular

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
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
Circular or semi-circular chart DKS Charts and Charting in Excel 3 November 3rd 09 01:50 PM
reuest formula for auto update status & status date PERANISH Excel Worksheet Functions 5 June 2nd 08 04:26 PM
Application Status Bar Scroll JB2010 Excel Programming 1 April 10th 07 02:16 PM
Need a msg box that displays time status or loading status havocdragon Excel Programming 2 April 2nd 05 05:29 PM
macro to close excel application other than application.quit mary Excel Programming 1 September 14th 04 03:43 PM


All times are GMT +1. The time now is 04:15 PM.

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

About Us

"It's about Microsoft Excel"