VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



SCROLL WORDS! A very easy way to scroll words at any length at any object that has a caption proper

by James Olarte (8 Submissions)
Category: String Manipulation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 14th December 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

SCROLL WORDS! A very easy way to scroll words at any length at any object that has a caption property.

API Declarations


'You only need a command button in a form to test this code.
'This code requires you to input the string to scroll
'then specify the object that has a caption property.
'When calling this function, place this code under a timer object
'Feel free to use my code for ease of coding.

Rate SCROLL WORDS! A very easy way to scroll words at any length at any object that has a caption proper



Static S%
On Error GoTo ErrorHandler:
    If S < Len(StringToScroll) Then
        TargetObjectCaption.Caption = TargetObjectCaption.Caption & Mid(StringToScroll, S + 1, 1)
        S = S + 1
    Else
        TargetObjectCaption.Caption = ""
        S = 0
    End If
    Exit Sub
ErrorHandler:
    MsgBox "Error: " & Err.Description, vbCritical + vbOKOnly, "Error " & Err.Number & " in ScrollWords!"
End Sub


Download this snippet    Add to My Saved Code

SCROLL WORDS! A very easy way to scroll words at any length at any object that has a caption proper Comments

No comments have been posted about SCROLL WORDS! A very easy way to scroll words at any length at any object that has a caption proper. Why not be the first to post a comment about SCROLL WORDS! A very easy way to scroll words at any length at any object that has a caption proper.

Post your comment

Subject:
Message:
0/1000 characters