Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is pretty simple, but puzzling. I placed a Label control on a
worksheet. I read in a range of text values that I want to display as the Label caption after a brief delay. The delay time is read in seconds. The For Each loop is supposed to update the caption. However, the caption value does indeed update because I tested it by putting it out in a MsgBox. But the caption graphic does not update. Code below. Any ideas appreciated. Thanks, SteveM Sub PlayAff() Dim affRng As Range Dim affCell As Range Dim startTime As Variant Dim delayTime As Integer Dim ws As Worksheet Range("AffAnchor").Select Range(Selection, Selection.End(xlDown)).Select Set affRng = Selection delayTime = Range("DelayTime") Set ws = Sheets("Play") ws.Activate ws.OLEObjects("AffLabel").Object.Caption = "" For Each affCell In affRng startTime = Timer ws.OLEObjects("AffLabel").Object.Caption = affCell MsgBox ws.OLEObjects("AffLabel").Object.Caption ' Shows correct text value Do While Timer <= startTime + delayTime ' caption display not updated. Loop Next End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Code into MS Object Sheet Hangs up | Excel Programming | |||
Automatic Sheet Updates | Excel Programming | |||
Function Updates from another sheet | Excel Programming | |||
VBA code that will be fired when another user updates links | Excel Programming | |||
Code to not display delete sheet alerts | Excel Programming |