ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Blinking Label on Splash Screen (https://www.excelbanter.com/excel-programming/327580-blinking-label-splash-screen.html)

Kro

Blinking Label on Splash Screen
 
How do I get a label (LoadingMessage) to blink on the Splash Screen until the
UserForm is unloaded?

Bob Phillips[_6_]

Blinking Label on Splash Screen
 
In the userform


Private Sub CommandButton1_Click()
Unload Me
End Sub

Private Sub UserForm_Activate()
nTime = Now + TimeValue("00:00:01")
Application.OnTime nTime, "Flash"
End Sub

In a standard code module

Public nTime

Sub Flash()
If UserForm1.Label1.ForeColor = RGB(255, 0, 0) Then
UserForm1.Label1.ForeColor = RGB(0, 255, 0)
Else
UserForm1.Label1.ForeColor = RGB(255, 0, 0)
End If
nTime = Now + TimeValue("00:00:01")
Application.OnTime nTime, "Flash"
End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Kro" wrote in message
...
How do I get a label (LoadingMessage) to blink on the Splash Screen until

the
UserForm is unloaded?





All times are GMT +1. The time now is 01:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com