Product.DeleteVariant
Use this method to delete the specified product variant.
Definition
Sub DeleteVariant(varVariantID As Variant)
Parameters
varVariantID
A Variant that contains the unique ID of the variant.
Return Values
None.
Error Values
This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to either standard or custom COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors.
The following table shows the custom COM errors that this method can return.
Constant | Value | Description |
E_CAT_CATALOG_DOESNT_SUPPORT_VARIANTS | &H88980032 | This catalog does not support product variants. This is determined when the catalog is created and cannot be changed. |
E_CAT_VARIANT_DOESNT_EXIST | &H8898001F | Variant did not exist. |
Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.
Remarks
For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.
Example
'vVarID is a Variant containing the unique ID
'for the product variant.
myProduct.DeleteVariant vVarID