everybody. I have the following code in vba:
With tb.DataBodyRange
MyRangeArray = Array(Worksheets(.Cells(1, 1).Value).Range(.Cells(1, 2).Value), _
Worksheets(.Cells(2, 1).Value).Range(.Cells(2, 2).Value), _
Worksheets(.Cells(3, 1).Value).Range(.Cells(3, 2).Value), _
Worksheets(.Cells(4, 1).Value).Range(.Cells(4, 2).Value), _
Worksheets(.Cells(5, 1).Value).Range(.Cells(5, 2).Value), _
Worksheets(.Cells(6, 1).Value).Range(.Cells(6, 2).Value))
End With
I am trying to set "MyRangeArray" to a cell value, like:
Sheets("Home").Visible = True
MyRangeArray = Range("E1").Value
and my range"E1" in Excel would be exactly the same text of the code.
I tried to make MyRangeArray = Range("E1").text (and .text2 and whatever) but cant make it work. Can anybody help? Thanks!