Declare and Initialize String Array in VBA

前端 未结 6 1685
刺人心
刺人心 2020-11-28 02:54

This should work according to another stack overflow post but its not:

Dim arrWsNames As String() = {\"Value1\", \"Value2\"}

Can anyone let

6条回答
  •  迷失自我
    2020-11-28 03:39

    Using

    Dim myarray As Variant
    

    works but

    Dim myarray As String
    

    doesn't so I sitck to Variant

提交回复
热议问题