Examples: Name property


The following procedure runs when the user clicks a button in a VBA user form. The Name property returns the name of the collection object returned by the DUOSObjectsGet method:

Private Sub CommandButton_Click()
	Dim Collection As DUOSObjects
	Dim ItemObject As DUOSObject

	If CustomerMaintenance.IsLoaded Then
		Set Collection = DUOSObjectsGet("Customers")
	Else
		Set Collection = DUOSObjectsGet("Items")
	End If
	'Display either "Customers" or "Items"
	MsgBox "The current collection is " + Collection.Name
End Sub


Documentation Feedback