Ich habe eine Mehrspaltige ListBox in einer UserForm ( 6Spalten) Wie kann ich die komplette ListBox mit allen Spalten an eine Tabelle übergeben?
Gruß
Christian
Option Explicit
Private Sub UserForm_Initialize()
Dim arr
Call tt 'Listbox wird 2spaltig befüllt
arr = ListBox1.List
Range("A1:B" & ListBox1.ListCount) = arr
End Sub
Sub tt()
With UserForm1
.ListBox1.AddItem "1"
.ListBox1.List(.ListBox1.ListCount - 1, 1) = "eins"
.ListBox1.AddItem "2"
.ListBox1.List(.ListBox1.ListCount - 1, 1) = "zwei"
.ListBox1.AddItem "3"
.ListBox1.List(.ListBox1.ListCount - 1, 1) = "drei"
'.Show
End With
End Sub
Gruß
Reinhard