Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Display a message in system tray | Excel Discussion (Misc queries) | |||
How do I open an Excel file on XP system, saved on a Vista system | Excel Discussion (Misc queries) | |||
Default Paper Tray | Excel Discussion (Misc queries) | |||
System Tray Notification/Alert | Excel Programming | |||
Print all worksheets from same tray | Excel Programming |