Access/VBA Library

Slice Method

Extracts a slice of the array.

Syntax

array_.Slice( StartIndex, EndIndex )
Parameters
Name Type Description
array_   The name of an object of type array_
StartIndex Integer Required. The index of the first element.
EndIndex Integer Required. The index of the last element.
Example
  Dim x As New Array_
  Dim slice as Array_

  Set slice = x.FromArray(Array(1, 2, 3, 4, 5)).Slice(2, 3)
  ' Result:
  'Array (
  ' [1] = > 2
  ' [2] = > 3
  ')