Updating Status Bar message when totals change

mcomp72

Active Member
Joined
Aug 14, 2016
Messages
275
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2011
Platform
  1. Windows
  2. MacOS
I am writing a Macro workbook with many sheets on it. On one sheet (let's call it Sheet1) is a total, and that total is generated from numbers located on many other sheets in the workbook.

I want the total on Sheet1 to display in the Status Bar, so I can see what it currently is no matter what sheet I'm currently working on. So, it's important that the Status Bar "refresh" every time the total changes, so it is always showing me the most current total.

I was able to figure out how to get the total to show on the Status Bar when the workbook opens, but am having a very hard time doing so when the sheets are updated. I put some code in the Worksheet_Change sub of Sheet1 (since that is where the total resides), but I started getting a 400 error, and at one point I was given some other error over and over again, until Excel crashed. (Unfortunately I didn't write down the error # and now I can't remember.) I can't understand what I could have done that caused such a problem.

I would like to ask the hive mind here: if you needed to do what I am trying to do, what is the way you would go about it? I must be making it way more difficult that it needs to be, because I have seen other workbooks that do what I am trying to do. I just can't seem to wrap my head around how to do it. I would love to see the way some of you would tackle this.
 

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.
Re: Need help on updating Status Bar message when totals change

Normal module:
Code:
Sub TTL()
Dim tot As Double
tot = Sheets("Sheet1").[A10]
Application.DisplayStatusBar = True
Application.StatusBar = "Current Total : " & Format(tot, "#,##0.00")
End Sub
Sheet1 module:
Code:
Private Sub Worksheet_Calculate()
Call TTL
End Sub
 
Upvote 0
Re: Need help on updating Status Bar message when totals change

That seems to be working great! Thank you!!! :cool:
 
Upvote 0

Forum statistics

Threads
1,214,923
Messages
6,122,283
Members
449,075
Latest member
staticfluids

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