Access/VBA Library

List Method

Assigns elements in the array to one or more variables.


array_.List( Vars-1 [, Vars-2 [,...[, Vars-N]]] )
Name Type Description
array_   The name of an object of type array_
Vars Variant Required. List of variables the elements should be assigned to.


  • When the number of elements is less than the number of variables only the variables which corresponds to an elemente are assigned, the remaining variables are untouched.
  Dim x As New Array_
  Dim FirstName, Lastname, Country

  x.FromArray (Array("Jeff", "Morisson", "USA"))
  x.List FirstName, LastName, Country
  Debug.Print "Firstname : ", Firstname
  Debug.Print "Lastname : ", Lastname
  Debug.Print "Country : ", Country
  ' Result:
  Firstname: Jeff
  Lastname: Morisson
  Country: USA