View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Alan Beban[_4_] Alan Beban[_4_] is offline
external usenet poster
 
Posts: 171
Default VBA Array Population with a Single Line of Code

Reading Bob Phillips's response made it clear that there is some
ambiguity in what you requested in your second inquiry. I assumed that
you had a 2-D array variable, beta, and you wanted to repopulate row 7,
column 3 to 14, with the unspecified list of values. In any event,
that's what my last post assumed.

Alan Beban

James B wrote:
I'm trying to figure out how to populate an array variable
in VBA without using something similar to the code below:

ReDim a(1 To 4)
a(1) = 2
a(2) = 3
a(3) = 5
a(4) = 7

Can this be done with a single line of code? Also, can I
populate a single section of a multidimensional array with
something like the following?

beta(7,3 to 14)= ..... the values for those points in the
array

Any help is certainly appreciated. I've been doing this
the long way for years, and it is driving me crazy!