newcoder1010 Posted April 20, 2015 Share Posted April 20, 2015 (edited) Hi, I am trying to return an array and then print it. It is printing blank values. Can you please help? Thanks. ----------------------- function ArrayExample (key,totalKey) dim x() ReDim x(totalKey) For i = key to totalKey x(key) = i ArrayExample = x(key) Next end function key = 2 totalKey = 4' dim y() ReDim y(totalKey) y(totalKey) = ArrayExample (key,totalKey) For i = key to totalKey msgbox y(key) Next Edited April 20, 2015 by newcoder1010 Link to comment Share on other sites More sharing options...
justsomeguy Posted April 22, 2015 Share Posted April 22, 2015 You're not returning an array from your function, you're returning a single value. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now