LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default Cell value in Title Bar or System Tray -Possible?

Global variables persist for the duration as do static varaibles. I think you
are familiar with globals so try this code and run it twice...

Sub test()
Static x As Integer

MsgBox x
x = 10
MsgBox x
End Sub

the first msgbox is a zero and the rest of the time they will be 10.
--
HTH...

Jim Thomlinson


"Mike K" wrote:

Jim T,
It doesn't work at all. I can't even get it to update manually.
Is it still due to the calculated vs change event? I'm not that strong in
VBA but I do know this sheet has given me fits in other areas due to the
calculate function.

Thanks a bunch,
Mike

"Jim Thomlinson" wrote:

How about using the on time event in a recursive call...

Sub RefreshTitle()
MsgBox "Tada"
application.caption = Sheets("Sheet1").Range("A1").value
Application.OnTime Now + TimeValue("00:00:02"), "RefreshTitle"

End Sub
--
HTH...

Jim Thomlinson


"Mike K" wrote:

Jim,
I was afraid of this. I works if I manually change the value in the
active cell, but this cell changes based on a sheet recalculation, not a
change event. The intial value is displayed and remains static. Any other
sugestions that may work with a worksheet calculation event? This value is
the speed of a manufacturing line pulled from the sql server every 2 seconds,
so it's basically realtime.

Thanks,
Mike

"Jim Rech" wrote:

It should be easy to update Excel's title bar. Just right click your
worksheet's tab and pick View Code. Then paste this in:

Private Sub Worksheet_Change(ByVal Target As Range)
Application.Caption = Target.Value
End Sub


--
Jim
"Mike K" wrote in message
...
Oh wise ones,

Is it possible to display the value of a cell in the Excel title bar or
the
system tray. You can see what I'm getting at, monitoring the value of a
cell
while excel is minimized. This value is constantly changing every 2
seconds
from a sheet calculation macro, so the Title/Tray would have to change
dynamically.

Mike



 
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
Display a message in system tray Vinod Excel Discussion (Misc queries) 0 March 29th 10 02:08 PM
How do I open an Excel file on XP system, saved on a Vista system JLS7 Excel Discussion (Misc queries) 3 December 2nd 08 04:21 AM
Default Paper Tray Thomas M Excel Discussion (Misc queries) 0 August 16th 06 07:48 AM
System Tray Notification/Alert [email protected] Excel Programming 2 November 7th 05 08:29 PM
Print all worksheets from same tray E Jackson Excel Programming 1 August 14th 03 03:56 AM


All times are GMT +1. The time now is 09:12 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"