View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
lvcha.gouqizi lvcha.gouqizi is offline
external usenet poster
 
Posts: 38
Default keep recursion result (a dynamic array) without using global variable

well, thanks. I just take the parameter way to deal with it and it
works well.

Another confusion without too much relation to the above is when I
define a function with a string parameter, can I give an elememnt from
a variant to that parameter? It seems always showing me the "ByRef
argument type mismatch" msgbox.

How do I force the element from a variant be string type?

Here is what the function seems like
___________________________
sub myFunc(str as string)
....
end sub
----------------------------------------------

and here is what I use to call myFunc
____________________________
Dim path() variant
Redim path(1 to 3, 1 to 100)
....
Redim Preserve path(1 to 3, 1 to 20)
myFunc(path(1, 2))



thanks!
lvcha