About the autocalculate in the status bar...


M

Mel

Excel 2003

I take it there's no way VBA method to access control of the
AutoCalculate feature in the status bar that shows avg/sum/etc upon
selecting cells of numbers... right?

I wanted to create a button that would make it toggle from sum to avg
instead of the conventional right-clicking it and then choosing the
function manually.

If not, I'm thinking of making my own display such as a modeless form
or toolbar.

Any experience with this or any ideas?

Thanks,
Melina
 
Ad

Advertisements

G

Gord Dibben

How about you see several functions at once?

Forgot who posted this.......Jim Rech?

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, _
ByVal Target As Range)
Dim s As String
Dim wfn As WorksheetFunction
Set wfn = Application.WorksheetFunction
On Error GoTo errH:
If wfn.Count(Target) < 2 Then
s = ""
Else

s = "Sum= " & wfn.Sum(Target) & " " & _
"Avg= " & wfn.Average(Target) & " " & _
"Min= " & wfn.Min(Target) & " " & _
"Max= " & wfn.Max(Target)

End If
errH:
Application.StatusBar = s
End Sub


Gord Dibben MS Excel MVP
 
M

Mel

Too cool! Much simpler than I was going to build. Saved me a lot of
time. Thanks.

Melina
 
Ad

Advertisements


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

Top