Scrolling text in Excel | Vertically scrolling text in user form
Go last for Download Practice file
Copy code here
Private Sub UserForm_Initialize()
Me.Label1.Caption = Sheet1.Range("b4").Value
Me.Label2.Caption = Sheet1.Range("E9").Value & vbCrLf & vbCrLf & Sheet1.Range("E10").Value & vbCrLf & vbCrLf & Sheet1.Range("E11").Value & vbCrLf & vbCrLf & Sheet1.Range("E12").Value & vbCrLf & vbCrLf & Sheet1.Range("E13").Value
Me.Label2.Top = Me.Height
end sub
**************************
Sub verti_scroll()
Call UserForm1.Show(vbModeless)
Do
i = UserForm1.Height - 30
Do
i = i - 1
DoEvents
For a = i To 5000000
a = a + 1
Next
UserForm1.Label2.Top = i
If i = 50 Then GoTo Nextz
Loop
Nextz:
x = x + 1
If x = 2 Then GoTo nextx
Loop
nextx:
end sub
Post a Comment