Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I am trying to pass a collection to a sub but I keep getting thi error: Compile Error: Argument not optional The collection is a collection of strings filled like this: For i = 0 To finalrow - 3 assyNums(i) = Range("C" & i + 2) Next i I use this command to call the sub: "Matching (assyNums)" where Matching is the sub and, assyNums is collection. The Sub looks like this: "Private Sub Matching(assyNums)" - OR - (if i add optional) "Private Sub Matching(Optional assyNums)" Inside the sub all i really do, is a for loop that accesses ever element, so like "For i = 0 To assyNums.Count" Any help would be greatly appreciated -- McManCS ----------------------------------------------------------------------- McManCSU's Profile: http://www.excelforum.com/member.php...fo&userid=2437 View this thread: http://www.excelforum.com/showthread.php?threadid=39181 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Passing a Sub's name as parameter | Excel Programming | |||
Passing parameter to a query | Excel Programming | |||
?Passing argument/parameter | Excel Programming | |||
?Passing argument/parameter | Excel Programming | |||
Passing a parameter to Excel | Excel Programming |