Thread: Do Until
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Do Until

Wolfgang,

Try something like

Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As
Long)
Private Sub CommandButton1_Click()
Dim Pos As Single
For Pos = 300 To 6 Step -1
Me.Repaint
Sleep 1
Me.Label1.Left = Pos
Next Pos
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"wolfgang" wrote in message
...
can someone help me with this loop. i am not too
familiar with it. i have a userform with a label. i
want the label to swoosh across the form from left = 300
to left =6. so i want the lable to start at left = 300
and slowly scroll across until left =6 TIA.