|  
                                             
	Hallo, 
	ich kann mit folgendem Code markierte Zeilen einer Multiselect Multicolumn ListBox in einer Userform über einen CommandButton in mein Worksheet kopieren. 
	Jetzt versuche ich allerdings, den Code zu umzubauen, dass die markierten Zeilen nicht in das Excel-Sheet kopiert werden sondern in einer neuen ListBox in der Userform angezeigt werden. 
	Den Code habe ich nicht selber erstellt, er erfüllt allerdings bisher meine wünsche sehr gut. Vielen Dank für Hilfe schonmal im Vorraus. 
	  
Private Sub CommandButton1_Click()
Dim Litem As Long, LbRows As Long, LbCols As Long
 Dim bu As Boolean
 Dim Lbloop As Long, Lbcopy As Long
 Dim m As Variant
 
  
 LbRows = ListBox2.ListCount - 1
 LbCols = ListBox2.ColumnCount - 1
   
    For Litem = 0 To LbRows
    If ListBox2.Selected(Litem) = True Then
          bu = True
          Exit For
    End If
    Next
    If bu = True Then
    With Sheets("Tabelle1").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0)
      
            For Litem = 0 To LbRows
                If ListBox2.Selected(Litem) = True Then 'Row selected
                  'Increment variable for row transfer range
                  Lbcopy = Lbcopy + 1
            For Lbloop = 0 To LbCols
                       'Transfer selected row to relevant row of transfer range
            .Cells(Lbcopy, Lbloop + 1) = ListBox2.List(Litem, Lbloop)
           Next Lbloop
                End If
            Next
            For m = 0 To LbCols
                With Sheets("Tabelle1").Cells(Rows.Count, 1).End(xlUp).Offset(0, m).Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = 23
        End With
Next
        End With
        
    Else
         MsgBox "Nothing chosen", vbCritical
    End If
MsgBox "The Selected Data Are Copied.", vbInformation
Sheets("Tabelle1").Select
End Sub
	  
	Grüße, 
	Morris 
     |