Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR BASIC

VBA Initialise/Initialize String/Number Array (not variant)

Sub UseStringArray()

    Dim sample() As String
    sample = StringArray("dog", "cat", "horse")

End Sub

Function StringArray(ParamArray ArgList())

    ReDim tempArray(UBound(ArgList)) As String
    For i = 0 To UBound(ArgList)
        tempArray(i) = ArgList(i)
    Next
    StringArray = tempArray

End Function
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #VBA #Array
ADD COMMENT
Topic
Name
1+1 =