Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assigning values into a 2 dimensional array

Status
Not open for further replies.

cowcool

Technical User
Apr 16, 2003
8
ID
Hi Guys,

How to assign values to a 2 dimensional array using only few lines of codes?

I understand that you can do this easily with Array function for 1 dimensional array, but how to do this with 2 a dimensional array ?

Thx!
 
>How to assign values to a 2 dimensional array using only few lines of codes?
From what background you come to vbs? Had you asked the same question ever in any other language? How few is few enough?! Even if it is few enough, does it meet the need which is manifold in principle?!
[tt]
dim a(5,5)
for i=0 to ubound(a,1)
for j=0 to ubound(a,2)
a(i,j)=i+j
next
next[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top