PropertyName As String
) As Variant;
[in] String PropertyName
Specifies the name of the property of the object. The name is case sensitive and must be enclosed in double quotes. Allowable values for PropertyName depend on the kind of IADs object.
This method gets the value of a specified property.
If the object has been declared as a plain IADs object, the allowable values are: ADsPath, Class, GUID, Name, Parent
If the object has been declared as, say, IADsDomain (which is inherited from IADs) then allowable values are those shown above and the names of the properties of the IADsDomain object, for example, "PasswordHistoryLength".
Consider the PasswordHistoryLength property of the Domain object. This is of type Long. The following lines of Visual Basic code get the value for this property using the Get method.
Dim HistoryLength As Long
Dim VarArg As Variant
Dim Domain As IADsDomain
'Get the domain object (assuming that MSFT is a valid domain)
Set Domain = GetObject("NTDS://MSFT")
VarArg = Domain.Get("PasswordHistoryLength")
HistoryLength = VarArg ' assign the VarArg to a variable of type Long
Debug.Print "HistoryLength = " & HistoryLength