Const offset As Integer = 3
Dim arrayIndex As Integer
' arrayIndex can vary between 3 and 9.
Dim y(0 To 6)
' The preceding statement allocates the same number of elements
' as Dim y(3 To 9).
y(arrayIndex - offset) = value
' The preceding statement converts arrayIndex to the
' corresponding index of y.