Hi prakash,
In response to your earlier posting I have added another button to your form and the following procedure:
'//insert selected items only
'//(hold "Shift" and click individual items to select them)
Private Sub InsertSelection_Click()
Dim i%, j%, N%
'//copy and paste heading
Windows("ListBookData.xls").Activate
Range("A1:D1").Select
Selection.Copy
Windows("ListBook.xls").Activate
Worksheets("Report").Activate
If Range("A1") = Empty Then
Range("A1").Select
Else
Range("A65536").End(xlUp).Offset(11, 0).Select
End If
ActiveSheet.Paste
Application.CutCopyMode = False
'//insert selected items
For i = 0 To 49
If ListBox1.Selected(i) = True Then
For j = 0 To 3
ActiveCell.Offset(0, j) = ListBox1.column(j, i)
Next j
End If
ActiveCell.Offset(1, 0).Select
Next i
'//move up to the "Data" row & count rows
N = 0
Do Until Selection = "Data"
ActiveCell.Offset(-1, 0).Select
N = N + 1
Loop
'//select all this...
Range(ActiveCell, ActiveCell.Offset(N, 3)).Select
'//sort to get rid of empty rows
Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
'//put in borders (go to another sub for this)
FormatCells
'//unload userform
Unload Me
End Sub
This allows you to select individual items from anywhere from either the main list, or, from one of the class lists.
For example, you may select one each from Roof, Floor, and Wall, OR, 3 or 4 of each from either Roof, Floor, or Wall etc. and these are put on your 'Report' sheet...(Have a look at the attachment).
If you now want (as it appears) to these put on different sheets - I think I've given you enough to work on to do this yourself, or, to put this up as a separate post...
Regards,
John