04 Create - AndrewMB2/Logic-Architect-for-Excel-VBA GitHub Wiki
Create method
Creates a TableData, ArrData or RsetData object. Returns True if successful, otherwise False.
Applies to
| TableData | ArrData | RsetData | Xdata | XShared |
|---|---|---|---|---|
| ✓ | ✓ | ✓ |
TableData
Parameters
| Name | Type | Description |
|---|---|---|
| TableStart | Range | The first cell where the header row will be placed. |
| Headers | Value, Array or ParamArray | List of field/column names. |
Creates a new TableData object and places a header row on the worksheet, starting at TableStart. If a table is required, then an empty table with one column should be placed on the worksheet first with it's header at TableStart.
ArrData
Parameters
| Name | Type | Description |
|---|---|---|
| Headers | Value or Array | List of field/column names. |
| RecordTypes | Value, Array or ParamArray of VbVartype constants | List of data types. |
There must be the same number of data types as headers.
RsetData
Parameters
| Name | Type | Description |
|---|---|---|
| Headers | Array | List of field/column names. |
| RecordTypes | Array of VbVartype constants | List of data types. |
Creates a recordset not associated with a database. There must be the same number of data types as headers. Fields use the closest adDataType data type, text fields use adVarWChar which is limited to 255 characters.