LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 492
Default Status Bar

Just got this code from one of the other groups. It displays all of the
options like Sum, Average etc available on the Status Bar at the same time.
A really useful thing to have in the Personal Macro's. I don't know who
wrote it, certainly not me! I'm just passing it on, I take off my hat to
whoever it was,
Regards,
Alan.

Option Explicit
Public WithEvents xlApp As Application

Private Sub Workbook_Open()
Set xlApp = Application
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Set xlApp = Nothing
Application.DisplayStatusBar = True
End Sub

Private Sub xlApp_SheetSelectionChange(ByVal Sh As Object, ByVal Target As
Range)
On Error Resume Next
If Target.Count < 2 Then
Application.StatusBar = False
Else
Application.StatusBar = _
"Average=" & Round(Application.Average(Target), 2) _
& "; " & "Count=" & Application.CountA(Target) & _
"; " & "Count nums=" & Application.Count(Target) & _
"; " & "Sum=" & Format(Round(Application.Sum(Target), 2), _
"#,##0.00") & "; " & "Max=" & Application.Max(Target) & "; " _
& "Min=" & Application.Min(Target)
End If
End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Status Bar Brad Excel Discussion (Misc queries) 5 August 5th 09 12:21 AM
reuest formula for auto update status & status date PERANISH Excel Worksheet Functions 5 June 2nd 08 04:26 PM
Status Bar - Need to see # of # mfelker Excel Discussion (Misc queries) 1 April 23rd 07 09:15 PM
Status Bar Reese85 Excel Discussion (Misc queries) 1 June 1st 06 06:11 PM
Need a msg box that displays time status or loading status havocdragon Excel Programming 2 April 2nd 05 05:29 PM


All times are GMT +1. The time now is 02:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"