Hi All,

I am trying to figure out how to work with array's in VBA. What I want to do is declare an array, then initialize it, then add numeric values to it for use in a calculation. Is there an easy way to do this? I can't figure it out. Can the array be linked to cells that contain values in a worksheet or something?

This is what I have so far, but I don't know if it makes sense or not and doesn't seem to work.

ReDim C(1 To imax, 1 To jmax) As Variant
C_0 = 0

For i = 1 To imax
For j = 1 To jmax
If Cells(i, j).Value = vbNullString Then
C(i, j) = Cells(i, j).Value
Else: C(i, j) = C_0 initialized value
End If
Next j
Next i

Thanks for the help