Marquee Effect on a Form

  • Thread starter Thread starter Pap
  • Start date Start date
copy this code below and paste it into your form module,
then you need to enter a timer interval value, I used
175. Then make sure that you have an event procedure on
the "on timer event".


Public Sub ScrollText()

Dim intLen As Integer
Dim strVal As String


strVal = "This text will scroll"
intLen = Len(strVal)

strVal = Right(strVal, Len(strVal) - 1) & Left(strVal, 1)
'Debug.Print strVal


'Me.txtScroll = strVal'this for a txtbox named "txtScroll"

Me.Caption = strVal

End Sub

Private Sub Form_Timer()
ScrollText
End Sub
 
Back
Top