View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Use VB array as as argument for worksheet function

Sub test()

myarray = Array(1, 2, 3, 4)
total = WorksheetFunction.Sum(myarray)
End Sub


"Bob Phillips" wrote:

Yeah, no problem, such as

Application.SUM(array)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"hmm" wrote in message
...
I know I can use Excel worksheet functions in VB. My question is when one
of
the parameters of a function is an array. Can I used an array defined in
VB
code (instead of the usual worksheet-range input) as the argument for this
function? Thanks.