📜  VBA Initialise Initialize String Number Array (not variant) - BASIC 代码示例

📅  最后修改于: 2022-03-11 14:52:01.884000             🧑  作者: Mango

代码示例1
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