LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Progress Bar

How about something simple like this:

Sub ShowProgressBar(lCounter As Long, _
lMax As Long, _
lInterval As Long, _
Optional lWidth As Long = 100, _
Optional strText As String)

Dim lStripes As Long

If lWidth = 0 Then
lWidth = 100
End If

If lCounter Mod lInterval = 0 Or lCounter = lMax Then
lStripes = Round((lCounter / lMax) * lWidth, 0)
DoEvents
Application.StatusBar = strText & _
String(lStripes, "|") & _
String(lWidth - lStripes, ".") & "|"
End If

End Sub


Sub test()

Dim i As Long

For i = 1 To 10000000
ShowProgressBar i, 10000000, 100000, , String(8, " ")
Next i

End Sub


RBS





"Paul W Smith" wrote in message
...
Is it possible to use a progress bar on a worksheet?

I have added the Microsoft ProgressBar Control version 6.0 to my Controls
list in Excel 2007. I can insert the control onto my worksheet but I can
find no way of controling it, or referencing it for that matter.

I am not interested in using the control bar on a userform, that would be
too easy and not waht my deliverable requires!

Paul Smith


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
PROGRESS BAR Ola2B Excel Discussion (Misc queries) 2 July 11th 07 08:13 PM
Progress Bar Ola2B Excel Programming 1 July 11th 07 04:34 PM
NEED Help - How to capture the Event's progress in Progress Bar Sriram Excel Programming 6 August 22nd 06 12:04 PM
Progress Bar ? CPhil[_3_] Excel Programming 2 April 12th 06 04:18 PM
Progress Bar matpj[_21_] Excel Programming 2 November 9th 05 05:32 PM


All times are GMT +1. The time now is 12:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"