I want to use the Split function in a custom made function and want the
output to be used in a main procedure.
My problem is with the following code:
***************************************************
Public Function ExtractData(TextString as String, _
Separator as String, _
Optional Block_N as integer = 0)
Dim StringToArray As String
StringToArray = Split(Expression:=DataString, _
Delimiter:=Separator, _
Limit:=-1)
ExtractData = StringToArray
End Function
***************************************************
(This is not my original function, but it'll do for my question.)
My output of this function would be in BASE 0, and I want this in BASE 1.
I have tried placing "OPTION BASE 1" at the top of my procedure, but it
seems that the "Split"-function can only return an array with BASE 0.
Can any1 tell me if there is a way to obtain the result from above
function with BASE 1, without having to ReDim the ExtractData-variable
and filling it again with the items from the StringToArray-variable?
Hopefully someone can give me an answer to this one.
TIA,
CoRrRan
Bookmarks