A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Scrolling text on splash screen



 
 
Thread Tools Display Modes
  #21  
Old November 3rd, 2005, 10:37 PM
Damon
external usenet poster
 
Posts: n/a
Default Scrolling text on splash screen

Is it possible to do this from right to left? In other words, can you have a
single line of text in a text box scrolling horizontally from right to left?

"Allen Browne" wrote:

Use the Timer event of the form to replace the Caption of the Label.

The example below has 6 lines of text to scroll up in a label named
lblScroll that shows 4 lines at a time:

Option Compare Database
Option Explicit

'Array of the lines to be scrolled in Form_Timer.
Private astrScrollText(0 To 5) As String

Private Sub Form_Load()
'Purpose: Load the array to use in Form_Timer.
astrScrollText(0) = "first line"
astrScrollText(1) = "2nd line"
astrScrollText(2) = "3rd line"
astrScrollText(3) = "4th line"
astrScrollText(4) = "5th line"
astrScrollText(5) = "last line"
End Sub

Private Sub Form_Timer()
'Purpose: Assign the text to scroll.
Dim i As Integer 'Loop controller.
Dim strOut As String 'Output string.
Static iIndex As Integer 'Array element index.
'Number of lines high the caption is (zero-based)
Const icCaptionHeightLessOne = 3

'Create the output string from the items in the array.
For i = 0 To icCaptionHeightLessOne
strOut = strOut & astrScrollText((iIndex + i) _
Mod (UBound(astrScrollText) + 1)) & vbCrLf
Next

'Assign to the caption of the label.
Me.lblScroll.Caption = strOut

'Move the static array index to the next item.
iIndex = iIndex + 1
If iIndex UBound(astrScrollText) Then
iIndex = LBound(astrScrollText)
End If
End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Damon" wrote in message
...
I have a splash screen that has a field I want to put about 3 pages of text
into. The field should only show 3 or 4 lines of text and should scroll.
The
text will never change, therefore it should not be editable. I have tried
to
do this but can get it to work. How would you all do this?

thanks,
Damon




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Formulas dealing with text data Bagia Worksheet Functions 6 June 20th, 2005 10:29 PM
Ideas On Producing Envelopes & Labels For Data RNUSZ@OKDPS Setting Up & Running Reports 0 April 28th, 2005 03:22 PM
Query for 'confirmation' rogge Running & Setting Up Queries 8 April 19th, 2005 03:26 PM
Outline Renee Hendershott Page Layout 2 December 25th, 2004 02:49 PM
textbox to normal text Jack Sons New Users 16 December 5th, 2004 03:44 PM


All times are GMT +1. The time now is 08:32 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.