pandoram316
New Member
Hello.
I am trying to have a macro change the color of the text in a textbox countdown timer to Red when the timer hits 30 seconds.
Here is what I have so far.
Can someone help me with it. It should be a black background (which it has) with white font, which it has and as soon as 30 seconds hits, the font turns red.
Thank you
I am trying to have a macro change the color of the text in a textbox countdown timer to Red when the timer hits 30 seconds.
Here is what I have so far.
Can someone help me with it. It should be a black background (which it has) with white font, which it has and as soon as 30 seconds hits, the font turns red.
Thank you
Code:
Sub nexttick()
If Sheet4.Range("C1") = 0 Then Exit Sub
Sheet4.Range("C1").Value = Sheet4.Range("C1").Value - TimeValue("00:00:01")
If Sheet4.Range("C1").Value <= TimeValue("00:00:30") Then
Sheet4.Shapes("TextBox 1").Fill.ForeColor.RGB = RGB(0, 0, 0)
Else
Sheet4.Shapes("TextBox 1").Fill.ForeColor.RGB = RGB(0, 0, 0)
End If
starttimer
End Sub
Last edited by a moderator: