WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

How can I make a label blink?

 
   Home -> Office -> User Forms RSS
Next:  text in cell is squished  
Author Message
cyberdude

External


Since: Jan 24, 2008
Posts: 28



(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.

Mike
Back to top
Login to vote
Helmut Weber

External


Since: Jun 18, 2005
Posts: 49



(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

whereby 5 is the duration of blinking.

--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP
Back to top
Login to vote
cyberdude

External


Since: Jan 24, 2008
Posts: 28



(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.

Mike
Back to top
Login to vote
Jay Freedman

External


Since: Mar 17, 2004
Posts: 4801



(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.
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> User Forms 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
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET