0

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

2
Contributors
1
Reply
12
Views
2 Years
Discussion Span
Last Post by BitBlt
0

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!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.