Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible to make the text in a shape scroll ? 1

Status
Not open for further replies.

Recce

Programmer
Aug 28, 2002
425
ZA
Good day,

I would like to know if it is possible to get the text within a shape to scroll ?

I am asking cause I know in previous versions of office there used to be an object that one could use however, it doesn't seem to come with Office 2007 anymore.

[pipe] "We know nothing but, that what we know is not the truth..." - Me
 
Hi,

Someone may know if three is a scrolling feature in 2007. But here's some code that may work for you...
Code:
Sub test()
    Dim t, s As String, t1
    t = Timer
    t1 = Timer
    s = [Message]
    Do
        DoEvents
        ActiveSheet.Shapes(1).TextFrame.Characters.Text = s
        If Timer > t1 + 0.5 Then '1/2 second per scroll
            s = ScrollText(s)
            t1 = Timer
        End If
    Loop While Timer < t + 5
End Sub
Function ScrollText(s As String) As String
    ScrollText = Mid(s, 2) & Left(s, 1)
End Function

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
This is so cool !

Thx for this.

[pipe] "We know nothing but, that what we know is not the truth..." - Me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top