array question

D

djc

I would love some yes/no's on these:

1) Dim varArray(10)

No option base statement. This array should have 10 total elements w/
subscripts 0 to 9. Yes/No?

2) Dim varArray(10)

No option base statement. This array should have 11 total elements w/
subscripts 0 to 10. Yes/No?

Thanks.
 
M

Michel Walsh

Hi,


No. In VBA and in Classic VB, the index, is the maximum value it can
take. In both case, varArray(10) is valid. The first case is equivalent to

Dim x( 0 to 10)

and the second case, to

Dim x(1 to 10)



Hoping it may help,
Vanderghast, Access MVP
 
D

djc

Thanks.

Michel Walsh said:
Hi,


No. In VBA and in Classic VB, the index, is the maximum value it can
take. In both case, varArray(10) is valid. The first case is equivalent to

Dim x( 0 to 10)

and the second case, to

Dim x(1 to 10)



Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top