Consulting

Results 1 to 2 of 2

Thread: label piscante no UserForm

  1. #1

    label piscante no UserForm

    Ol?
    preciso de um codigo para piscar o texto de uma label em um Userform.

    I nees a code to blinks text in UserForm's label.

  2. #2
    Ol?, eu j? consegui, obrigado, segue codigo:


    Option Explicit
    Private Declare Function GetTickCount Lib "Kernel32" () As Long
    Private Const Preto As Long = &H80000012
    Private Const Vermelho As Long = &HFF&
    Private Sub CommandButton1_Click()
    Dim lngTime As Long
    Dim i As Integer
    For i = 1 To 20 'Numero de vezes que o label vai piscar
    lngTime = GetTickCount
    If Me.Label1.ForeColor = Preto Then
    Me.Label1.ForeColor = Vermelho
    Else
    Me.Label1.ForeColor = Preto
    End If
    DoEvents
    Do While GetTickCount - lngTime < 200 'Tempo de espera para proximo loop de 2 segundos
    Loop
    Next
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •