Access/VBA Library

List Method

Assigns elements in the array to one or more variables.

Syntax

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

Remarks

  • 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.
Example
  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