RemoveCol - method of object PmDataTable

The methods removes one column on the specified position. Existing columns after this position are moved. All rows of the table are removed as well !
RemoveCol(Col As Variant) As Long
oDataTable.RemoveCol Column
Col(Variant) If the value of this parameter is >=0, then it is the index of the column (zero-based index) that has to be removed.

The value -2 means that the column has to be removed from the end of the table.

If the value of the parameter is of the String, then it is the name of the column that has to be removed.

Return Values:
Returns the index of the removed column. It returns the negative number if an error occurred (the column has not been removed). Then the error is written into the INFO system.

"Read only" columns: If any cell is locked in "Read only" column by writing non-empty value the the whole structure of the table is locked. Then it is no longer possible to add or remove rows or columns or change the structure of the table. The structure and dimensions of the table must be defined and modified before writing first non-empty value into a cell in "Read only" column.

Caution! Column of data type Identifier cannot be removed (if present). Only the following columns can be removed.

See also:
In the object "/Data/Params" (of the PmDataTable type) the following operations proceeds:
- The forth column is removed (the column with the index 3)
- The last column is removed
- The column with the name "abc" is removed
Dim oDataTable
Set oDataTable = pMe.Pm("/Data/Params1")
oDataTable.RemoveCol 3
oDataTable.RemoveCol -2
oDataTable.RemoveCol "abc"
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice