habe eine Frage zur Listbox.
Wenn ich den Inhalt einer Listbox ausdrucken will, und in die Seitenansicht von dem Dialogfeld drucken gehe, stürzt das Programm ab.
Muß ich das was noch beachten.
Danke im voraus für eure Professionelle Hilfe!
Andy
Private Sub CmdDrucken_Click()
Const SeiteVon = 1
Const SeiteBis = 4
Const Kopien = 2
Application.Dialogs(xlDialogPrint).Show arg1:=1, _
arg2:=SeiteVon, arg3:=SeiteBis, arg4:=Kopien
End Sub
Private Sub CommandButton1_Click()
Unload Me
End Sub
Private Sub ListBox1_Click()
Dim cu As Currency
Dim erg As Currency
With ListBox1
.TextColumn = 3
cu = .Text
End With
erg = TextBox1.Value * cu
TextBox2.Value = Format(erg, "#,##0.00 ")
End Sub
Private Sub UserForm_Initialize()
Dim i As Integer
Sheets("Tabelle2").Activate
i = ActiveSheet.UsedRange.Rows.Count
With UserForm9.ListBox1
.ColumnCount = 3
.ColumnHeads = True
.RowSource = "Tabelle2!A2:C" & i
.ColumnWidths = "2cm;3cm;2cm"
End With
TextBox1.Value = 1
TextBox2.Locked = True
End Sub