hi ppl,
in my vb code i have a listbox lst1
in whitch i add some items....
but in the lstbox they dont appear aligned
next the code and the exemple:
codpergunta is the name of the field in the bd that i opened before this code...
cod = CStr(rec.Fields("codpergunta"
)
If Len(cod) < 10 Then
For i = Len(cod) + 1 To 10
cod = cod & " "
Next
End If
codf = cod
pergunta= rec.Fields("pergunta"
)
If Len(pergunta) < 60 Then
For i = Len(pergunta) + 1 To 60
pergunta = pergunta & " "
Next
End If
perguntaf = pergunta
resposta = rec.Fields("resposta"
) ' only one char
respostaf = " " & resposta & " "
linha=codf & perguntaf & respostaf
lst1.additem linha
and when i run this with the previews exemple i obtain this:
cod Pergunta Resposta
1321 xxdxxxttttauyuuauuusisisisiic A
11 jjajksks sdddsdbnsbdsjbsjsdfsdkjfdsk B
2245564 kkfkkfklffdgfgçdlkfçgd C
but the wanted result was:
cod Pergunta Resposta
1321 xxdxxxttttauyuuauuusisisisiic A
11 jjajksks sdddsdbnsbdsjbsjsdfsdkjfdsk B
2245564 kkfkkfklffdgfgçdlkfçgd C
how can i obtain the correct result!??!?!
thanks
in my vb code i have a listbox lst1
in whitch i add some items....
but in the lstbox they dont appear aligned
next the code and the exemple:
codpergunta is the name of the field in the bd that i opened before this code...
cod = CStr(rec.Fields("codpergunta"

If Len(cod) < 10 Then
For i = Len(cod) + 1 To 10
cod = cod & " "
Next
End If
codf = cod
pergunta= rec.Fields("pergunta"

If Len(pergunta) < 60 Then
For i = Len(pergunta) + 1 To 60
pergunta = pergunta & " "
Next
End If
perguntaf = pergunta
resposta = rec.Fields("resposta"

respostaf = " " & resposta & " "
linha=codf & perguntaf & respostaf
lst1.additem linha
and when i run this with the previews exemple i obtain this:
cod Pergunta Resposta
1321 xxdxxxttttauyuuauuusisisisiic A
11 jjajksks sdddsdbnsbdsjbsjsdfsdkjfdsk B
2245564 kkfkkfklffdgfgçdlkfçgd C
but the wanted result was:
cod Pergunta Resposta
1321 xxdxxxttttauyuuauuusisisisiic A
11 jjajksks sdddsdbnsbdsjbsjsdfsdkjfdsk B
2245564 kkfkkfklffdgfgçdlkfçgd C
how can i obtain the correct result!??!?!
thanks