From: Steve Haack on 19 Dec 2009 13:19 I would like to put a banner on a Form and have the text in it automatically scroll (crawl) from left to right (like a stock ticker, for example). Does anyone know of a way to do that? Thanks, Steve
From: fredg on 19 Dec 2009 13:33 On Sat, 19 Dec 2009 10:19:01 -0800, Steve Haack wrote: > I would like to put a banner on a Form and have the text in it automatically > scroll (crawl) from left to right (like a stock ticker, for example). > > Does anyone know of a way to do that? > > Thanks, > Steve You would use code in the form's timer event. Add a label to the form. Set the Timer Interval to 1000. Code the Timer event: Private Sub Form_Timer() Dim strMsg As String Static I As Integer I = I + 1 strMsg = "some message here " ' Display then exit ' To display the message just one time If I > Len(strMsg) Then Exit Sub ' or if you wish to repeat the message ' If I > len(strMsg) Then I = 1 LabelName.Caption = LabelName.Caption & Mid(strMsg, I, 1) End Sub To slow the message down, set the Timer Interval to a greater value (1000 = 1 second). To speed the message up, decrease the Timer Interval value. -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail
|
Pages: 1 Prev: PivotChart Datalabels Next: Renaming a Word document from text in controls |