Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ProgressBar control in the StatusBar

10 views
Skip to first unread message

Tomás

unread,
Sep 6, 2001, 6:21:47 AM9/6/01
to
Hi, everyone.
How can i put a ProgressBar control in the StatusBar, like
Excel do when Save a file or open one.

Thanks


Norman Harker

unread,
Sep 6, 2001, 7:31:11 AM9/6/01
to
Hi Tomás!

I don't know about putting one in the status bar but the following looks
pretty good as a method of achieving the object.

http://j-walk.com/ss/excel/tips/tip34.htm

hth


"Tomás" <tco...@hotmail.com> wrote in message
news:786b01c136bd$bc360420$19ef2ecf@tkmsftngxa01...

Patrick Penet

unread,
Sep 6, 2001, 7:44:36 AM9/6/01
to
Hi, Thomas

It is not possible to use the Excel progress bar,
but you can make your own progress bar (as long
as you have XL2K or later) in a UserForm.

OTH
Patrick


"Tomás" <tco...@hotmail.com> wrote in message
news:786b01c136bd$bc360420$19ef2ecf@tkmsftngxa01...

Tim Barlow

unread,
Sep 6, 2001, 7:43:48 AM9/6/01
to
Tomas,

John Walkenbach posted the following message a few weeks
ago which is very useful (thanks John).

HTH

Tim

John Walkenbach's message:

Well, there's an easy and a hard way to do it. My web site
has a file
download that demonstrates the hard way. It's some very
complex VBA code
developed by David Wiseman, with additions by Jim Rech and
Ole P. Erlandsen.
You can download it here:

http://j-walk.com/ss/excel/files/developer.htm

The procedure listed below demonstrates the easy way (just
copy/paste it and
give it a spin). My philosophy is that simpler is better,
so I think this is
a better approach -- although it doesn't look quite as
good and you can't
control the color.

Sub StatusBarTest()
' Demonstrates status bar progress
Application.ScreenUpdating = False
SBText = "Processing "
For r = 1 To 1000
If r Mod 50 = 0 Then
SBText = SBText & Chr(1)
Application.StatusBar = SBText
End If
For c = 1 To 20
Cells(r, c) = Int(Rnd() * 100)
Next c
Next r
Application.StatusBar = False
Application.ScreenUpdating = True
End Sub

BTW, both of these work fine when screen updating is
turned off.

John Walkenbach
For Excel tips, macros, & downloads...
http://j-walk.com/ss

>.
>

Tomás

unread,
Sep 6, 2001, 7:55:54 AM9/6/01
to
Hi Norman!
Can you send me the file, I´m in the job a I don´t have
acces to other pages.
Thank you.
>.
>

Dana DeLouis

unread,
Sep 6, 2001, 10:24:07 AM9/6/01
to
Just an additional idea. If you changed the interval to 5, then the length
of the status bar would be very long.
Not knowing how long the display is would not give one a sense of the
percentage completed.
The following is not as efficient, but it may give some additional ideas.
This starts off with a length of about 30, and works its way down to a
length of zero.
(I had a better one, but I can't find it.)
The following is a modification of John's code for demo only.
Again, just an idea to kick around.


Sub StatusBar_Demo()

Dim Fx As WorksheetFunction
Dim lSize As Long
Dim lGrouping As Long

Set Fx = Application.WorksheetFunction
lSize = 30
lGrouping = Fx.RoundUp(1000 / lSize , 0)

Application.ScreenUpdating = False
SBText = "Processing "
For r = 1 To 1000

If r Mod 5 = 0 Then
Application.StatusBar = Fx.Rept(" <-", lSize - r / lGrouping)
End If

For c = 1 To 20
Cells(r, c) = Int(Rnd() * 100)
Next c
Next r
Application.StatusBar = False
Application.ScreenUpdating = True
End Sub


--
Dana DeLouis Windows Me & Office XP

"Tim Barlow" <tba...@trl.co.uk> wrote in message
news:16d1301c136c9$312b9230$a5e62ecf@tkmsftngxa07...

silvio

unread,
Sep 15, 2001, 6:38:21 PM9/15/01
to
All I know is this:

Application.StatusBar = "Executing procedure."
To reset:
Application.StatusBar = False

silvio

"Tomás" <tco...@hotmail.com> wrote in message
news:786b01c136bd$bc360420$19ef2ecf@tkmsftngxa01...

0 new messages