Copy tab delimited string to worksheet row - VB6 application

R

Ragnar Midtskogen

Hello,

I am working on a VB6 application that needs to copy tab delimited strings
to worksheet rows. The values in the string need to end up in successive
columns of the worksheet row.
The values are just text or numeric strings, some values may be zero length
strings.

Is there a simple way to do this or do I have to pick out the values and
copy them to the correct cell?

I have searched the Web and have not found anything yet, so I would
appreciate any pointers.

Ragnar
 
G

Guest

Using the split function you can create an array of values. You can then
pupulate cells with the array something like this...

Sub test()
Dim str As String
Dim aryStrings() As String

str = "This,That"
aryStrings = Split(str, ",")

Sheet1.Range("A1:B1").Value = aryStrings()

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