Try this:
' Variant array
Dim myVariantArray As Variant
myVariantArray = Array("Cat", "Dog", "Rabbit")
' String array
Dim myStringArray() As String
myStringArray = Split("Cat,Dog,Rabbit", ",")
More Related Contents:
- Excel-VBA – Insert new first column in datafield array without loops or API calls
- Creating an Array from a Range in VBA
- Expanding column cells for each column cell
- How do I slice an array in Excel VBA?
- Swift: Creating an Array with a Default Value of distinct object instances
- Check if a value is in an array or not with Excel VBA
- How to search for string in an array
- Sorting a multidimensionnal array in VBA
- How do I set up a “jagged array” in VBA?
- Matching values in string array
- Deleting Elements in an Array if Element is a Certain value VBA
- Is it possible to fill an array with row numbers which match a certain criteria without looping?
- Return Index of an Element in an Array Excel VBA
- Writing an array to a range. Only getting first value of array
- Excel VBA: Range to String Array in 1 step
- Faster way of using Sumifs()
- How to initialize a multidimensional array variable in vba for excel
- VBA using ubound on a multidimensional array
- Turn Excel range into VBA string
- Get values from union of non-contiguous ranges into array with VBA with a simple command (no loops)
- Why am I having issues assigning a Range to an Array of Variants
- Is there a way to not have to initialize arrays twice?
- Subscript out of range error with an array – no idea why?
- VBA Excel large data manipulation taking forever
- Performance difference between looping range vs looping array
- VBA – Returning array from Property Get
- How do I Merge two Arrays in VBA?
- Excel VBA Quickest way to sort an array of numbers in descending order?
- Keyed items in golang array initialization
- Excel VBA – How to Redim a 2D array?