lenght of status bar

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

Can someone please tell me how can I enlarge the box in status bar where the
calculations appears?

e.x. if the sum of the numbers I highlight in the sheet is large it don't
appear whole.

Thanks
Chris
 
You can't enlarge the box, but you can do this:
Right/click the Excel LOGO (near the file menu), select "View Code", paste
this in:
Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal Target
As Range, Cancel As Boolean)
On Error Resume Next
With Application.CommandBars("Cell")
.Controls("Sum of Selection").Delete
With .Controls.Add(msoControlButton)
.Caption = "Sum of Selection"
.OnAction = "SumSel"
End With
End With
End Sub

In a regular module, use EITHER:
Sub SumSel()
MsgBox Application.Sum(Selection)
End Sub

OR

Sub SumSel()
'This sub will put the sum in the status bar for 5 seconds
Application.Statusbar = Application.Sum(Selection)
Application.ontime NOW+5/86400,"ClearBar" '5 seconds
End Sub
Sub ClearBar()
Application.Statusbar = False
End Sub


Bob Umlas
Excel MVP
 
Thank you dear Bob!! Very helpful answer!

Bob Umlas said:
You can't enlarge the box, but you can do this:
Right/click the Excel LOGO (near the file menu), select "View Code", paste
this in:
Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal Target
As Range, Cancel As Boolean)
On Error Resume Next
With Application.CommandBars("Cell")
.Controls("Sum of Selection").Delete
With .Controls.Add(msoControlButton)
.Caption = "Sum of Selection"
.OnAction = "SumSel"
End With
End With
End Sub

In a regular module, use EITHER:
Sub SumSel()
MsgBox Application.Sum(Selection)
End Sub

OR

Sub SumSel()
'This sub will put the sum in the status bar for 5 seconds
Application.Statusbar = Application.Sum(Selection)
Application.ontime NOW+5/86400,"ClearBar" '5 seconds
End Sub
Sub ClearBar()
Application.Statusbar = False
End Sub


Bob Umlas
Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top