As far as I'm aware it's not possible to convert one type of array into another type with a single call, but if you're going to be doing this conversion in multiple locations the obvious option is to write a function that returns the desired result, as below:
Public Function SplitIntegers(StringToSplit As String, Sep As String) As Variant
Dim arrStrings() As String
Dim arrIntegers() As Integer
Dim i As Long
On Error GoTo Err_SplitIntegers
arrStrings = Split(StringToSplit, Sep)
ReDim arrIntegers(LBound(arrStrings) To UBound(arrStrings))
For i = LBound(arrStrings) To UBound(arrStrings)
arrIntegers(i) = CInt(arrStrings(i))
Next i
SplitIntegers = arrIntegers
Exit Function
Err_SplitIntegers:
Select Case Err.Number
Case 13 'Type Mismatch Error: StringToSplit contains non-numeric substrings
On Error GoTo 0
Err.Raise 9114, "SplitIntegers", _
"SplitIntegers failed: substring '" & arrStrings(i) & "' of string '" & StringToSplit & "' is not numeric"
Case Else 'Unhandled error, return to calling code
Dim iErrNum As Integer, strErrDesc As String
iErrNum = Err.Number
strErrDesc = Err.Description
On Error GoTo 0
Err.Raise iErrNum, "SplitIntegers", strErrDesc
End Select
End Function
When you need this functionality you can just call this function as a one-liner as you would the Split function.
Dim arrMyInts() As Integer
arrMyInts = SplitIntegers(Cells(1,1).Value, "_")
Integerarray is?Split()function always returns a String based array. There is no direct.Cast<int>in VBA. You would need a wrapper to convert that String based array to an Integer based one.CInt()on each value is the simplest in this scenario.