PDA

View Full Version : Solved: Label blinking in the UserForm



Felipe Dasi
07-02-2008, 09:45 AM
my contribuition to the forum:Option Explicit
Private Declare Function GetTickCount Lib "Kernel32" () As Long
Private Const Black As Long = &H80000012
Private Const Red As Long = &HFF&
Private Sub CommandButton1_Click()
Dim lngTime As Long
Dim i As Integer
For i = 1 To 20
lngTime = GetTickCount
If Me.Label1.ForeColor = Black Then
Me.Label1.ForeColor = Red
Else
Me.Label1.ForeColor = Black
End If
DoEvents
Do While GetTickCount - lngTime < 200
Loop
Next
End Sub

mikerickson
07-02-2008, 10:04 AM
Blinking screen elements can cause seizures in some users.