My fundamental question is how do I put columns 1, 7 & 8 from a named table into an array?
I've studied a similar question in Best way of putting various columns from a Table into an array and particularly the solution identified by Fluff
but keep getting a runtime error 9 subscript out of range.
My named table definitely exists but it appears that the vba doesn't recognise it. I'm using Excel 2013 if that is of significance.
This is the code so far..
Thanks
Geoff
I've studied a similar question in Best way of putting various columns from a Table into an array and particularly the solution identified by Fluff
but keep getting a runtime error 9 subscript out of range.
My named table definitely exists but it appears that the vba doesn't recognise it. I'm using Excel 2013 if that is of significance.
This is the code so far..
VBA Code:
Sub ColumnsTable_To_Array()
Dim myTable As ListObject
Dim myArray As Variant
'Set path for Table variable
myArray = Worksheets("Data list").ListObjects("Data").Range
Erase myArray
End Sub
Thanks
Geoff