Help needed to assign multiple values to multiple variables
I have declared some variables, as below;
Code:
Dim dep(1 To 112) As String
I am trying to tell VBA to assign different values to each variable using a For Next Loop. but I am having a some difficulty in writing the code that will assign a value to each of the variables.
My code is below, but it does not work...
Code:
Sheets("Department Correlations NEW").Select
Cells(2, 2).Select
For a = 1 To 112
Selection.Offset(0, 1).Select
dep(a) = ActiveCell.Value
Next a
I could write out 112 lines of code and assign the values that way but figured there must be a quicker way of doing this.
Thanks in advance.
Scott