If I have the following code
Would all the entries in A be initialized to 0 by default?![]()
Please Login or Register to view this content.
Thanks,
Stanley
If I have the following code
Would all the entries in A be initialized to 0 by default?![]()
Please Login or Register to view this content.
Thanks,
Stanley
Yes; numeric variables are initialized to zero, Variants to Empty, object variables to Nothing, variable-length strings to vbNullString, fixed-length strings to nulls, and user-defined types to the values appropriate to their internal types.
Andwill set them all back to zeros.![]()
Please Login or Register to view this content.
I'm also unsure about the amount of columns and rows A has. Does A have 5 columns and 1000000 rows?
You're welcome. Oops -- never mind!
A has 5 or 6 rows, and 1000000 or 1000001 columns, depending. See VBA Help for the Option Base statement.
You should declare arrays extents explicitly:
![]()
Please Login or Register to view this content.
I found out in the code by typing A( else to see that it's 0 to 5, 0 to 1000000. So it has 6 rows and 1000001 columns. I'm currently reading someone else's code that I'm supposed to modify and just got confused about that array.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks