04 AddFields - AndrewMB2/Logic-Architect-for-Excel-VBA GitHub Wiki

AddFields method

Adds all the fields from another Xdata object at the end. Returns True if successful, otherwise False.

Applies to

TableData ArrData RsetData Xdata XShared

Parameters

Name Type Description
Xd Any Xdata object Object from which fields are to be added.
DataType VbVarType enumeration (optional) Data type to be used if Xd is a TableData object.

AddFields adds all the fields which are on Xd but not on this ArrData object already. If Xd is a TableData object, fields do not have a data type so the DataType parameter must be supplied and is used to apply this data type to all the fields added. It is then possible to change their data type individually using ChangeType.