M
Mike
I'm fairly new to VBA and am trying to add a range to an array which
stores various information (so that I can have a simple image
associated with each piece of data). I can do this without problem,
however, when I then call upon this range through the array the output
I get is not formatted as the initial range is.
Currently my code looks like this:
Sub Load()
Dim i As Integer
Dim array(13, 4)
For i = 1 To 13
'Various inputs into array
array(i, 1) = Worksheets("Sheet1").Cells(37 + i, 2).Value
array(i, 2) = Worksheets("Sheet1").Cells(37 + i, 4).Value
array(i, 3) = Worksheets("Sheet1").Cells(37 + i, 5).Value
Next i
For i = 1 To 13
'The range which I hope will be the simple "image"
array(i, 4) = Worksheets("Sheet1").Range(Cells(2, 8*i -6), Cells(8,
8*i)).Value
Next i
'This range when outputed is not in the format I'd like
Worksheets("Deck").Range("N38:T44").Value = Cards(2, 4)
End Sub
I'd appreciate it if anyone could give me a hand with this.
Thanks for your time,
Mike
stores various information (so that I can have a simple image
associated with each piece of data). I can do this without problem,
however, when I then call upon this range through the array the output
I get is not formatted as the initial range is.
Currently my code looks like this:
Sub Load()
Dim i As Integer
Dim array(13, 4)
For i = 1 To 13
'Various inputs into array
array(i, 1) = Worksheets("Sheet1").Cells(37 + i, 2).Value
array(i, 2) = Worksheets("Sheet1").Cells(37 + i, 4).Value
array(i, 3) = Worksheets("Sheet1").Cells(37 + i, 5).Value
Next i
For i = 1 To 13
'The range which I hope will be the simple "image"
array(i, 4) = Worksheets("Sheet1").Range(Cells(2, 8*i -6), Cells(8,
8*i)).Value
Next i
'This range when outputed is not in the format I'd like
Worksheets("Deck").Range("N38:T44").Value = Cards(2, 4)
End Sub
I'd appreciate it if anyone could give me a hand with this.
Thanks for your time,
Mike