Sending data from List Box
Posted on 2012-03-22
Hi, i have a piece of code that sends data from a list box in one excel workbook to a sheet in another excel workbook.
The code is below
The problem is it sends all entries from the listbox whereas i only want it to send the item that has been selected by the user
How can i achieve this?
Private Sub SendingData_Click()
Dim NextCell As Range
Set NextCell = Workbooks("Match.xls").Worksheets("Mapping Table").Range("B" & Rows.Count).End(xlUp).Offset(1)
arrList = ListBox2.List
NextCell.Resize(UBound(arrList)).value = arrList