You could leave out NumberOfElements all together.
SunnyCode:Private Sub DoStuff() Dim MyArray() As String Dim MyString As String Dim X As Integer 'This could be any FQDN so it is not safe to 'assume a specific number of elements MyString = "myhost.mysubdomain.mydomain.myrootdomain" MyArray() = Split( MyString, "." ) For X = 0 To UBound(MyArray) DoMoreStuff Next X End Sub




Reply With Quote