ItemUser(vIndex As Variant) As User


vIndex As Variant
Index or name as variant.
If the parameter is a numerical value, the user is searched by its index (>= 0 and <= Count-1).
If it is an alphanumerical value, the user is searched by its unique name.


Returns the user from the collection, who is identified by the parameter vIndex.

The parameter vIndex can have two values:
· Index: Access with an index mostly is used in combination with the property Count to find out the position of the variable object in the list.
· Identification: The user can also be accessed with his unique identification.

Hint: The returned object should be checked on Nothing to find out, if no object for the search creteria was found.


'enumerate all users
Sub EnumUsers()
Dim zUser As User
Dim i As Integer

	For i = 0 To thisProject.Passwords.CountUser - 1
		'get user object
		Set zUser = thisProject.Passwords.ItemUser(i)
		Debug.Print zUser.Identification & " > " & zUser.Name
	Next i
End Sub

See Also

Passwords, User