atpgroups
5/8/2008 8:56:00 AM
On 8 May, 01:13, straightedge32
<straightedg...@discussions.microsoft.com> wrote:
> I tried doing just what you said, copying the syntax appropriately, but I
> just get an error message stating "Run time error 438: Object Doesn't Support
> this property or method".
Sorry, my mistake, I typed that reply last night on a machine without
Excel installed and I got it wrong (twice)
Set myRange = wrksht.Range(wrksht.Cells(nCurrRow, 8),
wrksht.Cells(nCurrRow, 16))
wrksht.Cells(nCurrRow, 17).Value =
Application.WorksheetFunction.Average(myRange.Value)
Will work. "Object Doesn't Support this property or Method" was due to
me inventing a new method "WorkSheetFunctions" when it is
"WorkSheetFunction"
Also, the .Value applies to myRange, not to Average() so it was in the
wrong place.
Sorry for any confusion I might have caused.