Question:
How can I create the following array without knowing the ending number before hand:
myArray = Array(0, 1, 2, 3, 4)
For example, I can do something similar in Python:
myList = range(ending_number)
As well as in Matlab:
myVector = 0:ending_number
More Detail:
I have a path being specified in an Excel worksheet that references a location on a Linux server. I want the user to only have to specify the path in terms that the Linux server understands, but also need to reference a location in terms that both the local Windows machine and the Linux server understands. The Linux server path is specified as
/home/shelf6/some/path/to/a/location/on/the/server
and the corresponding path in Windows is specified as
\\SB1\home_shelf6\some\path\to\a\location\on\the\server
I am currently converting from one to the other with the following commands:
WinJobLoc = Split(LinJobLoc, "/", -1, vbTextCompare)
WinJobLoc = "\\sb1\" & WinJobLoc(1) & "_" & WinJobLoc(2) & "\" & _
Join(Application.WorksheetFunction.Index(WinJobLoc, 0, _
Array(4, 5, 6, 7, 8, 9, 10, 11)), "\", vbTextCompare)
However, since I will only be able to know the length of the path from UBound(WinJobLoc), I don't know of an easy way to get the portion of the path following "shelf6."
Is there some way to do what I'm trying to do (i.e. without the hard-coded array), or is there an easier way to do the whole thing?