I was reading recently that the use of Variants should be avoided when variables can otherwise be defined with more specificity. I have used Variants to split strings so that I can manipulate the substrings as needed. I just learned that I can accomplish the same thing without declaring a variant variable by simply using the Split function, i.e:
[VBA]
Dim r As Range
Set r = ActiveSheet.Range("A1")
MsgBox Split(r.Value)(0) ' or any number within the substring count
'Or
MsgBox Split(r.Value)(UBound(Split(r.Value)))
[/VBA]
Would splitting the strings as shown above be any better or worse than declaring a variant variable and then splitting the string?