Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Sun, 30 Nov 2003 05:22:33 -0600, Chip Pearson wrote:
Try using specific variable types in your array declaration and the called function definition. For example, the following code works in Excel 97 and Excel 2003. Sub AAA() Dim Arr(1 To 10) As Long Dim Ndx As Long For Ndx = 1 To 10 Arr(Ndx) = Ndx * 10 Next Ndx BBB Arr() I don't know about 97 or 2003, but in Excel 2000 the parentheses aren't necessary - you can do it like this: BBB Arr and it works. End Sub Sub BBB(X() As Long) Dim Ndx As Long For Ndx = LBound(X) To UBound(X) Debug.Print X(Ndx) Next Ndx End Sub -- auric "underscore" "underscore" "at" hotmail "dot" com ***** The Toe that can be stubbed is not the true Toe. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Passing string as array variable (Pivot VBA) | Excel Discussion (Misc queries) | |||
meaning of : IF(Switch; Average(array A, array B); array A) | Excel Worksheet Functions | |||
Passing a row to a function | Excel Worksheet Functions | |||
Passing array to a function | Excel Programming | |||
Passing an Array of User-Defined Type to an Argument of a Function | Excel Programming |