Eine Listbox kann abwechselnd links- und rechtsbündig gefüllt werden...
Sie brauchen eine Form und eine Listbox.
Private Declare Function GetSystemMetrics Lib "user32" _
(ByVal nIndex As Long) As Long
Private Sub AddRightAlignText(mControl As ListBox, strText As String)
Dim m_CheckWidth As Long
If mControl.Style = 1 Then
m_CheckWidth = ((GetSystemMetrics(71) + 2) * 15)
End If
strText = Space((mControl.Width - TextWidth(strText) - 100 _
- m_CheckWidth) / TextWidth(Space(1))) & strText
mControl.AddItem strText
End Sub
Private Sub Form_Load()
With List1
.AddItem "Linksbündig"
Call AddRightAlignText(List1, "Rechtsbündig")
.AddItem "Und wieder links"
Call AddRightAlignText(List1, "Rechtsbündig")
.AddItem "Und nochmal rechts"
End With
End Sub