Help with Array & Split

L

Les

Hello all,

I have a form that has data that the user enters with respect to a part
number, i have a radio button that if the user selects then he can enter
multiple part numbers, seperated by a comma ",". All the other data remains
the same.
What i am trying to do and really battling with is to split the numbers by
"," and then for every number i would like to start a new line and insert all
the data in a spreadsheet. What i had in mind was an array with a split
function, but not sure if i am thinking in the right direction.


Any help would be much appreciated.
 
G

Gary''s Student

You can always input a string variable and create an array from it:

Sub les()
Dim s As String
s = "1,2,3"
ar = Split(s, ",")
End Sub
 
L

Les

Thanks Gary
--
Les


Gary''s Student said:
You can always input a string variable and create an array from it:

Sub les()
Dim s As String
s = "1,2,3"
ar = Split(s, ",")
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top