View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
DaSo DaSo is offline
external usenet poster
 
Posts: 8
Default working with strings

Hi!
Could anybody explain me how "Split" or something similar works?
I have a string and in a loop I want to choose this string´s characters
according to index(i).
I have a problem with running the following macro:

Sub choose()

Dim myString As String
Dim StringValues
Dim i As Long

sValues = _
"A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12"

StringValues = Split(myString, ",")

For i = 0 To 12

If Cells(i + 1, "A").Value < StringValues(i) Then
Cells(i +1, "A").EntireRow.Insert
End If

Next i

End Sub

Any help would be great.

Thanks, Dan


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!