Nowadays structured references are the preferred way to access table data in Excel and VBA. Although most of the examples you may have looked at so far have talked about ranges, you can also specify table references to cDataSet – this allows you to mix cDataSet integration capabilities with other code you may have written which uses structured table references.
Populating a datasetYou already have the ability to refer to data by it’s column name in cDataSet ( ds.row(“x”).column(“y”) ), so the only real integration with tables that is needed is to be able to use a reference to load them to a cdataset initially. Normally, you would populate a dataset with You’ll need a version of cDataSet.xlsm that has version 23 or higher of the usefulStuff module for this to work. You can either download that from here, replace the specific module from github (code below, or use automatic updating as described here. https://gist.github.com/brucemcpherson/3414346 |
For more on this topic see How to use cDataSet