Access/VBA Library

FromArray Method

Creates an array from the specified Array.

Syntax

array_.FromArray( AnArray )
Parameters
Name Type Description
array_   The name of an object of type array_
AnArray Variant Required. The Array to be used as the source of the array to be created.

Remarks

  • If AnArray is not the type Array the error "Type mismatch" is raised.
  • AnArray should not contain objects.
Example
  Dim x As New Array_

  debug.print x.FromArray (Array(1, 2, 3, "4", 5, "End of array"))
  ' Result :
  'Array (
  ' [1] = > 1
  ' [2] = > 2
  ' [3] = > 3
  ' [4] = > 4
  ' [5] = > 5
  ' [6] = > End of array
  ')