Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Passing arrays to VBA module
My experience with user defined functions has been limited to simple
procedures using individual data items as arguments. Now, I need to grab a range of values from the SS, pass them to a function as one or more arrays, read the arguments into local arrays withing the VBA procedure, perform my process, and return the function value. I need a simple illustration of this process but have had no luck with the Excel/VBA help. Where should I look? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Passing arrays to VBA module
Here is a simple example
Function mySum(rng As Range) As Long Dim ary Dim i As Long ary = rng For i = LBound(ary) To UBound(ary) mySum = mySum + ary(i, 1) Next i End Function -- HTH RP (remove nothere from the email address if mailing direct) "Ralph K" wrote in message ... My experience with user defined functions has been limited to simple procedures using individual data items as arguments. Now, I need to grab a range of values from the SS, pass them to a function as one or more arrays, read the arguments into local arrays withing the VBA procedure, perform my process, and return the function value. I need a simple illustration of this process but have had no luck with the Excel/VBA help. Where should I look? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Passing Strings from UserForm to Module | Excel Programming | |||
passing arrays between functions in VBA | Excel Programming | |||
arrays - module to module | Excel Programming | |||
Passing variables from module to userform | Excel Programming | |||
Passing arrays to a subroutine | Excel Programming |