- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am working on a macro which has to draw a combination of the same designs but with different parameters (e.g. length). In an userform you have to put in multiple lengths so you get designs of these lengths.
To draw these designs I need an array which contains these values of lengths. To do this I use the following lines:
Dim length(10) As Double 'define length of the designs
Dim lengthST As String 'ST is string
Dim lengthSP() As String 'SP is splitted string
lengthST = inputwindow.lengthTextBox.Text
lengthSP = Split(lengthST, ",")
For s = 0 To UBound(lengthSP)
length(s) = lengthSP(s) + 0
Next s
If UBound(lengthSP) < 1 Then length(0) = Val(lengthST)
From these lines I don't get an error, but lengthSP does not have a value, or isn't even an array I think.
Can someone explain to me my mistake, because I already saw in examples that this should work.
Thanks in advance!
Solved! Go to Solution.