• Advertisement

Archived

This topic is now archived and is closed to further replies.

pass array to function

This topic is 5372 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
Yes, you can pass arrays in VB. Post your relevent code along with the error and maybe we can help you.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Wow, you get an error. Is it a secret error? Why wont you tell us the error?

Share this post


Link to post
Share on other sites
public function CheckNum(NumToBeChecked as Integer, NumsAlreadyPicked(Sub) as Integer)

error:
expected: )

Share this post


Link to post
Share on other sites
but its supposed to be a variable-sized array.
how can i do that?
(besides, when i put a number in, it still gave me that error)

[edited by - aceofjokerz on June 5, 2003 4:09:03 PM]

Share this post


Link to post
Share on other sites
You were just told the answer, remove Sub from the (Sub), if you need to know how big it is (dynamic) just pass in the number of array elements as well so you don''t go out of bounds

~Graham

Share this post


Link to post
Share on other sites
do you mean pass the subscript as a separate variable?
i just tried that, and it worked, so if that''s what you were talking about, thanks, otherwise, i figured it out on my own :D

Share this post


Link to post
Share on other sites

  • Advertisement