Dim msngSpeed As Single
Private Sub cmdExit_Click()
End
End Sub
Private Sub cmdFeedback_Click()
frmFeedback.Show
End Sub
Private Sub lblMsg_Click()
End Sub
Private Sub UserForm_Activate()
msngSpeed = 0.1
RunMarquee
End Sub
Sub RunMarquee()
'There is no timer control in VBA excel, there is a timer function that returns the number of
'seconds since midnight. Weird, but workable.
Dim sngStart As Single
Dim sngPausetime As Single
On Error Resume Next
sngStart = Timer ' Set start time. No. of seconds since midnight
StartHere:
sngPausetime = msngSpeed
'following will pause 1 second
Do While Timer < sngStart + sngPausetime
DoEvents ' Yield to other processes.
Loop
'Now run the marquee
Call LabelMarquee(lblMsg)
sngStart = Timer
GoTo StartHere
End Sub
Private Sub LabelMarquee(ctl As Control)
'Set what you want displayed in the Caption property of the control, make sure you have at least 1 trailing space.
Dim buffer As String
buffer = ctl.Caption
If Len(buffer) > 1 Then
ctl.Caption = Mid$(buffer, 2) & Left$(buffer, 1)
End If
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
End
End Sub