(Msg. 1) Posted: Mon Jun 30, 2008 5:44 am
Post subject: How can I make a label blink? Archived from groups: microsoft>public>word>vba>userforms (more info?)
Hi,
Have put a lable on a userform. May I ask how I can make it blink?
Thanks.
(Msg. 2) Posted: Mon Jun 30, 2008 5:01 pm
Post subject: Re: How can I make a label blink? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Hi Mike, in a module:
Option Explicit
Public Declare Sub Sleep Lib "kernel32" _
(ByVal dwMilliseconds As Long)
' ---------------------------------------
Sub start()
UserForm2.Show
End Sub
The Userform:
Private Sub UserForm_Activate()
Dim t1 As Single
t1 = Timer
' MsgBox t1
While t1 + 5 > Timer
Sleep 500
Me.Label1.Visible = Not Me.Label1.Visible
DoEvents
Wend
End Sub
(Msg. 3) Posted: Mon Jun 30, 2008 5:46 pm
Post subject: Re: How can I make a label blink? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
On 6$B7n(B30$BF|(B, $B2<8a(B11$B;~(B01$BJ,(B, Helmut Weber <red.....DeleteThis@t-online.de> wrote:
> Hi Mike, in a module:
>
> Option Explicit
> Public Declare Sub Sleep Lib "kernel32" _
> (ByVal dwMilliseconds As Long)
> ' ---------------------------------------
>
> Sub start()
> UserForm2.Show
> End Sub
>
> The Userform:
>
> Private Sub UserForm_Activate()
> Dim t1 As Single
> t1 = Timer
> ' MsgBox t1
> While t1 + 5 > Timer
> Sleep 500
> Me.Label1.Visible = Not Me.Label1.Visible
> DoEvents
> Wend
> End Sub
>
> whereby 5 is the duration of blinking.
>
> --
>
> Greetings from Bavaria, Germany
>
> Helmut Weber, MVP WordVBA
>
> Vista Small Business, Office XP
Hi,
Thank you very much for the solution. In the line:
Public Declare Sub Sleep Lib "kernel32" _
(ByVal dwMilliseconds As Long)
it uses Lib "kernel32". Is Lib "kernel32" a built-in library?
Thanks.
(Msg. 4) Posted: Mon Jun 30, 2008 9:26 pm
Post subject: Re: How can I make a label blink? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
On Mon, 30 Jun 2008 17:46:48 -0700 (PDT), cyberdude <honchorlee.RemoveThis@gmail.com>
wrote:
>On 6?30?, ??11?01?, Helmut Weber <red.....RemoveThis@t-online.de> wrote:
>> Hi Mike, in a module:
>>
>> Option Explicit
>> Public Declare Sub Sleep Lib "kernel32" _
>> (ByVal dwMilliseconds As Long)
>> ' ---------------------------------------
>>
>> Sub start()
>> UserForm2.Show
>> End Sub
>>
>> The Userform:
>>
>> Private Sub UserForm_Activate()
>> Dim t1 As Single
>> t1 = Timer
>> ' MsgBox t1
>> While t1 + 5 > Timer
>> Sleep 500
>> Me.Label1.Visible = Not Me.Label1.Visible
>> DoEvents
>> Wend
>> End Sub
>>
>> whereby 5 is the duration of blinking.
>>
>> --
>>
>> Greetings from Bavaria, Germany
>>
>> Helmut Weber, MVP WordVBA
>>
>> Vista Small Business, Office XP
>
>Hi,
>
>Thank you very much for the solution. In the line:
>
>Public Declare Sub Sleep Lib "kernel32" _
> (ByVal dwMilliseconds As Long)
>
>it uses Lib "kernel32". Is Lib "kernel32" a built-in library?
>Thanks.
>
>Mike
Yes, it refers to kernel32.dll, which is part of every version of Windows. You
should find it in the C:\windows\system32 folder.
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
All times are: Eastern Time (US & Canada) (change)
Page 1 of 1
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum