Can someone please look at this code for me. I got this code of another forum (forgot the user's name so unable to reference) but all I am trying to do is get text to scroll from left to right in smooth transition.
The below code works
but it makes the text scroll too fast. The answer he had was to increase the delay time ie
. I have tried that to no avail.
My form has a command button as you can see from the code and 2 label boxes. The cmd button should start the scroll once clicked.
Thanks
The below code works
Code:
Private Sub cmdscroll_Click()
Dim x As Integer, y As Integer
Dim Start, delay
For x = 1 To 100
Start = Timer
delay = Start + 1
Do While Timer < delay
lbl1.Caption = Mid(lbl1.Caption, 2) & Left(lbl1.Caption, 1)
lbl2.Caption = Mid(lbl2.Caption, 2) & Left(lbl2.Caption, 1)
DoEvents
Loop
DoEvents
Start = Timer
delay = Start + 1
Next x
End Sub
but it makes the text scroll too fast. The answer he had was to increase the delay time ie
Code:
delay = start+3000
My form has a command button as you can see from the code and 2 label boxes. The cmd button should start the scroll once clicked.
Thanks