|
-
Jun 13th, 2000, 08:05 PM
#1
Hi,
I have an array with 20 spaces and know the data I need to put into each slot is there a quicker way to do this than by doing
MyArray(0) = 1
MyArray(1) = 6
MyArray(2) = 10
etc,,,
Is it possible to do something like
MyArray = (1, 6, 10 etc)
It would save a lot of screen space for a start !
-
Jun 13th, 2000, 08:25 PM
#2
You can use the Array function; the only drawback is that the Array function must be performed on the Variant data type (which is less efficient than the other data types). Here's the code:
Code:
Dim MyArray As Variant
.
.
.
MyArray = Array(1, 6, 10 ...)
When you reference MyArray, the low-bound index will be 0, and upper-bound will be # of items - 1.
"It's cold gin time again ..."
Check out my website here.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|