Examples: Remove method


The following procedure runs when the user clicks a button in a VBA user form. It removes a property object from a properties collection using the Remove method:

Private Sub RemoveColorProperty_Click()
	Dim ItemCollection As DUOSObjects
	Dim ItemObject As DUOSObject
	Dim ItemProperties As DUOSProperties

	Set ItemCollection = DUOSObjectsGet("ItemInfo")
	Set ItemObject = ItemCollection(ItemNumber)
	Set ItemProperties = ItemObject.Properties

	If ItemProperties.Exists("Item Color") Then
		ItemProperties.Remove("Item Color")
	End If
End Sub


Documentation Feedback