Display worksheet name in statusbar

Mann750

Board Regular
Joined
Dec 16, 2009
Messages
72
Hi,

I was wondering if there was a way to display the name of the sheet a macro is working on in the status bar once the macro has been completed.

I have 4 worksheets the macro runs through and would like to update the user as each worksheet is done.

I tried using:

Code:
Dim wsname As Worksheet
Dim wsn As String
 
wsn = wsname.Name
 
Application.StatusBar = "& wsn & worksheet complete, please wait for others to be completed"

Many thanks in advance for your help!!!
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
You would need to place that in a loop that processes the sheets. Also use

Application.StatusBar=False

when you are done.
 
Upvote 0
It would be:

Code:
Application.StatusBar = wsn & " worksheet complete, please wait for others to be completed"
 
Upvote 0
You've put the variable name within the string.

Try something like:
Code:
Sub test()

    Dim wrkSht As Worksheet
    
    For Each wrkSht In Worksheets
        Application.StatusBar = wrkSht.Name & " worksheet complete, please wait for others."
    Next wrkSht

End Sub
 
Upvote 0
Apologies for the delay but many thanks for your replies. Both Andrew and Darren's code works fine so thank you very much for your help :eek:)
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,120
Members
451,399
Latest member
alchavar

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