C
Captain_Nemo
Gang -
This simple macro does what I want: it brings text onto the status bar
from the right and drops it off on the left at a 1/10 sec per character
rate. It could stand to be improved. The first loop is relatively
smooth because the period's spacing, though proportional, is constant.
The second loop is herky-jerky because of the proportional font being
used.
Can I control the status bar font to get a mono-spaced font? Can I get
to the pixel level and make a true scroll? Any other thoughts?
....best, Capt N.
Sub BarCrawl()
Dim strCrawl As String
Dim strCrawlStaticText As String
Dim i As Integer
Dim iLength As Integer
Dim bOriginalStatusBar As Boolean
strCrawlStaticText = "Your text goes here"
iLength = Len(strCrawlStaticText)
strCrawl = ""
bOriginalStatusBar = Application.DisplayStatusBar
For i = 1 To iLength
strCrawl = strCrawl & "."
Next i
Application.DisplayStatusBar = True
For i = 0 To iLength
Application.StatusBar = Right(strCrawl, iLength - i) &
Left(strCrawlStaticText, i)
Wait (0.1)
Next i
For i = 1 To iLength
Application.StatusBar = Right(strCrawlStaticText, iLength - i)
Wait (0.1)
Next i
Application.DisplayStatusBar = bOriginalStatusBar
End Sub
Sub Wait(t As Single)
Dim sTime As Single
sTime = Timer + t
Do While Timer < sTime
Loop
End Sub
--
Email to (e-mail address removed) (yes, you can so figure it out) ;-]
Scream and shout and jump for joy! I was here before Kilroy!
Sorry to spoil your little joke. I was here but my computer broke. ---Kilroy
This simple macro does what I want: it brings text onto the status bar
from the right and drops it off on the left at a 1/10 sec per character
rate. It could stand to be improved. The first loop is relatively
smooth because the period's spacing, though proportional, is constant.
The second loop is herky-jerky because of the proportional font being
used.
Can I control the status bar font to get a mono-spaced font? Can I get
to the pixel level and make a true scroll? Any other thoughts?
....best, Capt N.
Sub BarCrawl()
Dim strCrawl As String
Dim strCrawlStaticText As String
Dim i As Integer
Dim iLength As Integer
Dim bOriginalStatusBar As Boolean
strCrawlStaticText = "Your text goes here"
iLength = Len(strCrawlStaticText)
strCrawl = ""
bOriginalStatusBar = Application.DisplayStatusBar
For i = 1 To iLength
strCrawl = strCrawl & "."
Next i
Application.DisplayStatusBar = True
For i = 0 To iLength
Application.StatusBar = Right(strCrawl, iLength - i) &
Left(strCrawlStaticText, i)
Wait (0.1)
Next i
For i = 1 To iLength
Application.StatusBar = Right(strCrawlStaticText, iLength - i)
Wait (0.1)
Next i
Application.DisplayStatusBar = bOriginalStatusBar
End Sub
Sub Wait(t As Single)
Dim sTime As Single
sTime = Timer + t
Do While Timer < sTime
Loop
End Sub
--
Email to (e-mail address removed) (yes, you can so figure it out) ;-]
Scream and shout and jump for joy! I was here before Kilroy!
Sorry to spoil your little joke. I was here but my computer broke. ---Kilroy