Declare array as global across subs in a application:
Public GlobalArray(10) as String
GlobalArray = Array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L')
Sub DisplayArray()
Dim i As Integer
For i = 0 to UBound(GlobalArray, 1)
MsgBox GlobalArray(i)
Next i
End Sub
Method 2: Pass an array to sub. Use ParamArray.
Sub DisplayArray(Name As String, ParamArray Arr() As Variant)
Dim i As Integer
For i = 0 To UBound(Arr())
MsgBox Name & ": " & Arr(i)
Next i
End Sub
ParamArray must be the last parameter.