Another 20 cents;
Code:
Const sArr As String = "1,3,5,7"
Sub a()
Dim v
For Each v In Split(sArr, ",")
MsgBox CInt(v)
Next
End Sub
If we're talking efficiency here, surely simply having an array in the first place is more efficient than this code? This way, the array needs to be split then accessed by a identifier. Having the array as an array in the first place means you can access based on whatever index you like.
Obviously, if you're going for 'robustness, flexibility and maintainability' then I guess I have these words...
Robustness: Provided it is coded correctly, having the array as a variable as opposed to a constant should make no difference. The robustness will only be compromised if the code itself interferes with the values in the array. If it is programmed correctly, it will not. If you want to include efficiency in here, then granted, the non-constant array will be evaluated every time it is used.
Flexibility: By definition, a constant is not flexible. You cannot change its value unless you go into the code and change it there. This is a similar effect to declaring a variable as something, and making sure no code interacts with it.
Maintainability: Well, bit of a laymans attitude, but just declare the array at the top of the code if you like. So long as it's in scope, it doesn't matter anyway. In fact, using a variable to store the array makes it in fact more maintainable, as you can set it up as public, and can then create methods that will adapt the values to suit given certain scenarios.