Heyjoe
New member
Hello programmers,
I am trying to read a range into a variant array.
In the first case I am able to read a range into the array myarr. This range is not part of a table.
In the second case (right before End Sub) I am trying to read an entire table into myarr but I get a 1004 error. I suspect that I may have improper syntax in the second case.
Why does the last command not work?
I am trying to read a range into a variant array.
Code:
Private Sub Readwords_Click()
Dim myarr As Variant
myarr = Range("a7:b8").Value [COLOR=#008080]'this command works
[/COLOR]myarr = Range("Words").Value [COLOR=#006400]'this command does not work[/COLOR]
End Sub
In the second case (right before End Sub) I am trying to read an entire table into myarr but I get a 1004 error. I suspect that I may have improper syntax in the second case.
Why does the last command not work?
Last edited by a moderator: