Displaying a Progress Indicator (VBA)

S

shapiro

Does anyone know how to use the Percentage Indicator bar VBA? I found it on
this website http://j-walk.com/ss/excel/tips/tip34.htm and I think it
is really cool. Unfortunately the code is only written specifically for the
purpose of creating random numbers to fill up 25 columns and 100 rows.
Sometimes I come across lengthy macros and wonder if my computer "hung up" on
me.
Look at my simple macro for bold, red and underline
Sub Macro1()
Range("E8:E9").Select
Selection.Font.Bold = True
Selection.Font.ColorIndex = 3
Selection.Font.Italic = True
Selection.Font.Underline = xlUnderlineStyleSingle
Range("I5").Select
End Sub

How do I create a progress bar for this code. I tried but only produced a
"frozen" Progress Indicator bar. I am using windows 2003
Thanks
 
J

Jim Cone

Your code should execute almost instantly and therefore a progress bar
is not needed and it wouldn't be able to show progress even if you tried.

To use one requires a value that changes during the execution of the code.
For example that could be in a For/Next loop...

For N = 1 to 100
'do stuff
MyProgressBar.Width = N / 100 * 400
Next
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"shapiro" <[email protected]>
wrote in message
Does anyone know how to use the Percentage Indicator bar VBA? I found it on
this website http://j-walk.com/ss/excel/tips/tip34.htm and I think it
is really cool. Unfortunately the code is only written specifically for the
purpose of creating random numbers to fill up 25 columns and 100 rows.
Sometimes I come across lengthy macros and wonder if my computer "hung up" on
me.
Look at my simple macro for bold, red and underline
Sub Macro1()
Range("E8:E9").Select
Selection.Font.Bold = True
Selection.Font.ColorIndex = 3
Selection.Font.Italic = True
Selection.Font.Underline = xlUnderlineStyleSingle
Range("I5").Select
End Sub

How do I create a progress bar for this code. I tried but only produced a
"frozen" Progress Indicator bar. I am using windows 2003
Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top