im Archiv habe ich einen Code gefunden der
die 1 Spalte einer ListBox druckt.
Wie lautet die Syntax, wenn man alle 9 Spalten
einer ListBox drucken möchte.
Private Sub cmdPrint_Click()
Dim Temp As Worksheet
Dim i As Integer
Dim iRow As Integer
On Error GoTo FEHLER
With Application
.ScreenUpdating = False
.DisplayAlerts = False
End With
iRow = 3
Set Temp = Worksheets.Add
With Temp
If ListBox1.ListIndex > 0 Then
For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) Then
Cells(iRow, 1) = ListBox1.List(i)
iRow = iRow + 1
End If
Next
Else
For i = 0 To ListBox1.ListCount - 1
Cells(i + 3, 1) = ListBox1.List(i)
Next
End If
.PrintOut
.Delete
End With
FEHLER:
With Application
.ScreenUpdating = True
.DisplayAlerts = True
End With
End Sub
Kan mir jemand dabei helfen?
Vielen Dank im Voraus.
Grüße