How do I get a label (LoadingMessage) to blink on the Splash Screen until the
UserForm is unloaded?
How do I get a label (LoadingMessage) to blink on the Splash Screen until the
UserForm is unloaded?
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?
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?
>
>
>
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?
> >
> >
> >
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?
> > >
> > >
> > >
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks