VBA: Getting a table into an array

veldthui

New Member
Joined
Dec 1, 2007
Messages
11
I am trying to pull data from a table into an array in VBA but am unsure how to get the table data. Previously I just used a range and loaded the range straight into the array but now want to change to a table format but cannot get the data into the array.

Any help appreciated.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Use the range of the table.
Code:
arrTable = Range("Table1").Value
 
Upvote 0
Use the range of the table.
Code:
arrTable = Range("Table1").Value

That is what I used but it was returning an error. I have tried it again and it now seems to work with all but one table. Maybe something in the table is causing the issue so will redo the table and see how it goes.

Cheers
 
Upvote 0

Forum statistics

Threads
1,215,183
Messages
6,123,522
Members
449,103
Latest member
Michele317

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top