guitardave78
Programmer
I need to split a string (split(arr)) and have it be a long type 
}...the bane of my life!
}...the bane of my life!
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Dim sTest As String
Dim arLongs() As Long
Dim arStrings() As String
Dim i As Long
sTest = "1,2,3,4,5,6"
arStrings = Split(sTest, ",")
ReDim arLongs(UBound(arStrings))
For i = LBound(arStrings) To UBound(arStrings)
arLongs(i) = CLng(arStrings(i))
Next
Dim i As Long
Dim arTemp(50000) As String
Dim sTest As String
Dim arLongs() As Long
Dim arStrings() As String
Dim iTimer As Single
For i = LBound(arTemp) To UBound(arTemp)
arTemp(i) = Str(i)
Next
sTest = Join(arTemp, ",")
Erase arTemp
iTimer = Timer
arStrings = Split(sTest, ",")
ReDim arLongs(UBound(arStrings))
For i = LBound(arStrings) To UBound(arStrings)
arLongs(i) = CLng(arStrings(i))
Next
Erase arStrings
Erase arLongs
Call MsgBox("Time: " & Round(Timer - iTimer, 4))