+ Reply to Thread
Results 1 to 5 of 5

Blinking Label on Splash Screen

  1. #1
    Kro
    Guest

    Blinking Label on Splash Screen

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

  2. #2
    Bob Phillips
    Guest

    Re: 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" <Kro@discussions.microsoft.com> wrote in message
    news:8427D2C4-0D73-4F0F-BFD9-23A040701572@microsoft.com...
    > How do I get a label (LoadingMessage) to blink on the Splash Screen until

    the
    > UserForm is unloaded?




  3. #3
    Kro
    Guest

    Re: Blinking Label on Splash Screen

    It works, but when the UserForm closes automatically per code in the
    Initialize section, the label seems to still be blinking.

    How do I get this flashing label to stop when the form is closed
    automatically.

    "Bob Phillips" wrote:

    > 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" <Kro@discussions.microsoft.com> wrote in message
    > news:8427D2C4-0D73-4F0F-BFD9-23A040701572@microsoft.com...
    > > How do I get a label (LoadingMessage) to blink on the Splash Screen until

    > the
    > > UserForm is unloaded?

    >
    >
    >


  4. #4
    Bob Phillips
    Guest

    Re: Blinking Label on Splash Screen

    I am confused, if the form is closed, there is no label, so how can it
    flash?

    --

    HTH

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


    "Kro" <Kro@discussions.microsoft.com> wrote in message
    news:23C0E9A7-6B22-40D1-A397-37E8C835BA9A@microsoft.com...
    > It works, but when the UserForm closes automatically per code in the
    > Initialize section, the label seems to still be blinking.
    >
    > How do I get this flashing label to stop when the form is closed
    > automatically.
    >
    > "Bob Phillips" wrote:
    >
    > > 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" <Kro@discussions.microsoft.com> wrote in message
    > > news:8427D2C4-0D73-4F0F-BFD9-23A040701572@microsoft.com...
    > > > How do I get a label (LoadingMessage) to blink on the Splash Screen

    until
    > > the
    > > > UserForm is unloaded?

    > >
    > >
    > >




  5. #5
    Bob Phillips
    Guest

    Re: Blinking Label on Splash Screen

    I see it now, add this code to the form module


    Private Sub UserForm_Terminate()
    Application.OnTime nTime, "Flash", Schedule:=False
    End Sub

    --

    HTH

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


    "Bob Phillips" <bob.phillips@notheretiscali.co.uk> wrote in message
    news:OVpbwy%23QFHA.688@TK2MSFTNGP10.phx.gbl...
    > I am confused, if the form is closed, there is no label, so how can it
    > flash?
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "Kro" <Kro@discussions.microsoft.com> wrote in message
    > news:23C0E9A7-6B22-40D1-A397-37E8C835BA9A@microsoft.com...
    > > It works, but when the UserForm closes automatically per code in the
    > > Initialize section, the label seems to still be blinking.
    > >
    > > How do I get this flashing label to stop when the form is closed
    > > automatically.
    > >
    > > "Bob Phillips" wrote:
    > >
    > > > 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" <Kro@discussions.microsoft.com> wrote in message
    > > > news:8427D2C4-0D73-4F0F-BFD9-23A040701572@microsoft.com...
    > > > > How do I get a label (LoadingMessage) to blink on the Splash Screen

    > until
    > > > the
    > > > > UserForm is unloaded?
    > > >
    > > >
    > > >

    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1