Hi VB Wiz,

I have a data that is currently displayed in row, but i need it to display in one column.

this is how currently look like

set1 [lastname/firstname] [lastname/firstname] [lastname/firstname] [lastname/firstname]
set2 [lastname/firstname] [lastname/firstname] [lastname/firstname] [lastname/firstname][lastname/firstname] [lastname/firstname] [lastname/firstname] [lastname/firstname]
set3 [lastname/firstname] [lastname/firstname][lastname/firstname] [lastname/firstname] [lastname/firstname] [lastname/firstname][lastname/firstname] [lastname/firstname] [lastname/firstname] [lastname/firstname]
note: data count changes

now i need to display all data in one column like below.

set1
[lastname/firstname]
[lastname/firstname]
[lastname/firstname]
[lastname/firstname]

set3
[lastname/firstname]
[lastname/firstname]
[lastname/firstname]
[lastname/firstname]
[lastname/firstname]
[lastname/firstname]
[lastname/firstname]
[lastname/firstname]

set2
[lastname/firstname]
[lastname/firstname]
[lastname/firstname]
[lastname/firstname]
[lastname/firstname]
[lastname/firstname]
[lastname/firstname]
[lastname/firstname]
[lastname/firstname]
[lastname/firstname]

set2
[lastname/firstname]
[lastname/firstname]
[lastname/firstname]
[lastname/firstname]
[lastname/firstname]
[lastname/firstname]
[lastname/firstname]
[lastname/firstname]
[lastname/firstname]
[lastname/firstname]
[lastname/firstname]
[lastname/firstname]

many thnx

Your best bet is to store each of the sets in a single string, then use the "SPLIT" function in VB6 to parse the sets into a series of one-dimensional arrays, then iterate through the arrays.

Here's a crude example to get you started. You might have to play with the delimiter to get it to work just right:

Private Sub SplitMyStrings()

Dim set1 As String

set1 = "[lastname/firstname][lastname/firstname][lastname/firstname][lastname/firstname]"

Dim myStringArray() As String

myStringArray = Split(set1, "[")

For Each myString In myStringArray
    Debug.Print myString
Next myString

End Sub

Hope this helps! Happy coding!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.