Thread
:
VBA for EXCEL and Average
View Single Post
#
5
Posted to microsoft.public.excel.programming
D.S.[_2_]
external usenet poster
Posts: 18
VBA for EXCEL and Average
Thanks, that did help me get going in the right direction.
What seems to be working is
..TextBox1.Text=Application.Worksheetfunction.Aver age(Selection)
D.S.
"J.E. McGimpsey" wrote in message
...
one way:
With UserForm1
On Error Resume Next
.TextBox1.Text = Application.Average(Selection)
If Err Then _
.TextBox1.Text = "Invalid Selection" 'or perhaps zero
On Error GoTo 0
.Show
End With
In article ,
"D.S." wrote:
Thanks, but that's still not what I'm looking for, that would return the
average of the same range each time. I'm trying to return the average
of
the range I have selected with my mouse at the time the userform is
loaded.
Reply With Quote
D.S.[_2_]
View Public Profile
Find all posts by D.S.[_2_]