On 2002-05-25 03:45, misterg wrote:
All,
Just wondered if there was a way of scrolling text within a merged range, for no purpose other than adding an effect.
Answers on a postcard team...
G
Well, ther are a number of ways you can do this, using API and timers, IeTimers and the easiest (see below).
Note: There are any number of variations to this theme that you can consider.
eg. Using Different Fonts (Wingdings) to get different graphics effect, Bold, color etc.
This should get you started though.
Following just animates a string in D5
If you play around with the timing, TextFont and colour you can get good efffects.
<pre/>
Sub Tester1()
Dim sp As String
Dim sTxt As String
Dim x As Integer, y As Integer
Dim Start, delay
sTxt = "Hi there!!"
For y = 1 To 15 '15 Loops through the scrolling
For x = 1 To 30 'Index number of times
Start = Timer 'Set start to internal timer
delay = Start + 0.15 'Set delay for .15 secs
Do While Timer < delay 'Do the display routine
[D6] = Space(x) & sTxt 'Show 1 str @ a time
DoEvents 'do there things
Loop 'Loop until delay is up
DoEvents
Start = Timer 'and reset the timer
delay = Start + 0.15 'and the delay
Next x 'Show the next str
Next y 'Do this again - 15
[D6] = "" 'Reset
End Sub
</pre>