SUM in VBA
i = Application.Sum(Worksheets("Sheet1").Range("A1:A13 "))
"Gary''s Student" wrote:
In the worksheet:
=SUM(Sheet1!A1:Sheet1!A13)
works just fine, giving the sum of cells.
In VBA:
Dim i As Variant
i = Application.SUM(Sheet1!A1:Sheet1!A13) just give a compile error.
Why?
--
Gary's Student
|