How Can I create a status Bar

travelingwilly

New Member
Joined
Jun 19, 2002
Messages
24
I am loading and processing a large amount of records. But I wish to give the users a kind of status bar showing there percentage done. I know how many Lines there are But how can you do it graphicly. I thought about a UserScreen But what type of filed can I used to show a bar type of thing ????
W
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Hi,

See if you can modify this to suit your needs (taken from a Google thread, sorry can't remember who to credit!)

<pre>
Sub StatusBarTest()
Dim SBText As String, r As Integer, c As Integer
' 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
Sheets("Sheet4").Cells(r, c) = Int(Rnd() * 100)
'write random numbers to this sheet
Next c
Next r
Application.StatusBar = False
Application.ScreenUpdating = True
End Sub</pre>

HTH
 
Upvote 0
Thanks works great.. Just need to get The Percentage to work out better

Application.ScreenUpdating = False

For x = 2 To .Rows.Count
If round((x / .Rows.Count) * 100,2) Mod 10 = 0 Then
Application.StatusBar = "Loading CSV File (" + CStr(round((x / .Rows.Count) * 100,2)) + "% Completed)" + Chr(1)
End If

next x
Application.StatusBar = False
Application.ScreenUpdating = True
 
Upvote 0

Forum statistics

Threads
1,203,094
Messages
6,053,507
Members
444,667
Latest member
KWR21

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top