Thread: SUM in VBA
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default SUM in VBA

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