Application StatusBar

Steve001

Board Regular
Joined
Apr 13, 2017
Messages
62
Office Version
  1. 365
  2. 2021
  3. 2013
Platform
  1. Windows
Morning All,

The status bar looks like it is in two halves ? or am i wrong (i can see a dividing line)

I can put a message in the first part by
Application.StatusBar = ("Updating Sheet Data Please Wait")

i am wanting to put a status of something in the second half is this possible how?

Can somebody please advise

PS please put comments in the code - still learning


Regards

Steve
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
:edit blonde moment :eeek: just realised the area i was looking at displays messages from excel ie "save file as ..."
Can i still populate this area with a status message with ease ?
 
Upvote 0
Can I still populate this area with a status message with ease ?
Yes
Paste attached into a module and run from any sheet. Observe status bar.

Code:
Sub StatusBarMessages()
'capture original value
    Dim oldStatusBar:  oldStatusBar = Application.DisplayStatusBar

'doing things and updating the status bar
    Application.StatusBar = "Adding data..."
        Application.Wait (Now + TimeValue("00:00:02"))  'dummy VBA action
        
    Application.StatusBar = "30% complete, sorting data ..."
        Application.Wait (Now + TimeValue("00:00:05"))
    
    Application.StatusBar = "85% complete , exporting data ..."
        Application.Wait (Now + TimeValue("00:00:05"))
    
'reset to riginal value
    Application.StatusBar = False: Application.DisplayStatusBar = oldStatusBar
End Sub
 
Upvote 0
Hi Yongle,

Thank you for your reply, I ant ting to put a message in the area to the right of the status bar.
Is this possible?

Steve
 
Upvote 0
I think the usable space is all on the left. But I can see this very long string on my screen :eeek:
Code:
 Application.StatusBar = "abcdefghijklmnopqrstuvwxyz0123456789....ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789....abcdefghijklmnopqrstuvwxyz0123456789....ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789...."
 
Upvote 0
Thank you,

I have managed to do it with a bit of "fudge" factor, a blank string of twenty spaces then another string with my message for status.

Steve
 
Upvote 0
That is not a "fudge" - it is more making the best of an Excel limit in an "ugly" manner :laugh:
But you could make it look less ugly like this
Code:
Application.StatusBar = "ABCDEFGHIJKLMNOPQRSTUVWXYZ " & String(20, " ") & "abcdefghijklmnopqrstuvwxyz"
 
Last edited:
Upvote 0
Hi Yongle,

Thank you again
:)

i like this >
String(20, " ")

I had set a string called space = " "(20 spaces in it)

and used this within my messages

Steve
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

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