Thread: Progress Bar
View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
EricG EricG is offline
external usenet poster
 
Posts: 220
Default Progress Bar

First of all, some of you responders are pretty rude. Not had your coffee
today?

Secondly, yes it is possible. Go into Design Mode and add a Progress
Control 6.0 object to a worksheet. Get out of Design Mode. Paste the
following code into a general module. Run Macro1. It should cause the
progress control to show status. The Status Bar will show what value the
progress control should be showing. Adapt to your needs.

You can set the properties of the control in Design Mode. Right click on
it, and select Properties. Set Min, Max, etc to whatever you need them to be.

HTH,

Eric

'
' Macro1 Macro
' Macro recorded 12/3/2009 by Eric Gundersen
'
Sub Macro1()
Dim i As Long
'
For i = 1 To 100
ActiveSheet.OLEObjects("ProgressBar1").Object.Valu e = i
Application.Wait Now + TimeValue("0:00:01") ' Wait one second...
Application.StatusBar = "i = " & Format(i, "000")
Next i
Application.StatusBar = False ' Resets the status bar to normal mode
End Sub


"Paul W Smith" wrote:

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


.