this code moves a box along the status bar
like a percent finished
run the sub to use it
Function fWriteStatus(ByVal intTheCount As Integer, _
ByVal intTheMax As Integer) As String
Dim intCount1 As Integer
Dim intCount2 As Integer
' This puts a little box moving in the taskbar
' First part of status bar
fWriteStatus = " |"
' Now add some spaces up to the value
' we wish to represent
For intCount1 = 1 To intTheCount
fWriteStatus = fWriteStatus & Chr(32)
Next intCount1
' add a box (is's a non-printing ascii
' character)
fWriteStatus = fWriteStatus & Chr(2)
' Fill the rest of the gauge with spaces
For intCount2 = intCount1 To intTheMax
fWriteStatus = fWriteStatus & Chr(32)
Next intCount2
' ...then add the end marker and a
' percentage complete figure.
fWriteStatus = fWriteStatus & "| " _
& Format(intTheCount / intTheMax, "0%")
End Function
Sub sUsage1()
For Count = 0 To 5
Application.StatusBar = fWriteStatus(Count, 40)
Application.Wait Now() + TimeValue("00:00:01")
Next
Application.StatusBar = False
End Sub