ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Rolling credits list (https://www.excelbanter.com/excel-programming/364340-rolling-credits-list.html)

Archie[_6_]

Rolling credits list
 
I would like to add a userform with a rolling credit list.
I ca only find static text items like 'Label', 'TextBox'' etc.
I need something that scrolls automaticly by, lets say, 2 lines per second.

Archie



Jason S.

Rolling credits list
 
Why not a "listbox." Use blank list item entries for intro and homespun
timer/counter to remove entries and rewrite. Jason

"Archie" wrote:

I would like to add a userform with a rolling credit list.
I ca only find static text items like 'Label', 'TextBox'' etc.
I need something that scrolls automaticly by, lets say, 2 lines per second.

Archie




keepITcool

Rolling credits list
 

Adapt from following:

create a userform with 2 controls:
1 commandbutton
1 label (high enough for several lines.. e.g. 64points)


Option Explicit

Private Declare Sub Sleep Lib "kernel32.dll" ( _
ByVal dwMilliseconds As Long)

Const DELIM As String = ","
Dim bEsc As Boolean

Private Sub Shift(s As String)
Dim i&
i = InStr(1, s, DELIM)
s = Mid$(s, i + 1) & DELIM & Left$(s, i - 1)
End Sub

Private Sub CommandButton1_Click()
bEsc = True
End Sub

Private Sub UserForm_Activate()
Dim s$
bEsc = False
s = ",,,,,,Example,Of,A,Rolling,Credits,List,,,,"

On Error GoTo theEnd
Application.EnableCancelKey = xlErrorHandler
Do Until bEsc
Label1 = Replace(s, DELIM, vbLf)
Shift s
DoEvents
Sleep 400
Loop

theEnd:
End Sub

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
bEsc = True
End Sub


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Archie wrote in

I would like to add a userform with a rolling credit list.
I ca only find static text items like 'Label', 'TextBox'' etc.
I need something that scrolls automaticly by, lets say, 2 lines per
second.

Archie



All times are GMT +1. The time now is 11:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com