Marquee Effect on a Form

G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top