Q: Declaring a dynamic array

  • Thread starter Thread starter Srdjan Kovacevic
  • Start date Start date
S

Srdjan Kovacevic

Can anyone explain how to declare an array of form:

Arr(X1, X2, ..., Xn)

Where n is user defined variable?

How would I read/write data from such an array?

Thanx in advance!

srdjan
 
Srdjan,

Try something like the following:

Dim Arr() As Long
Dim N As Long
N = 10
Redim Arr(1 To N)




--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 

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

Back
Top