stirlingmw
Board Regular
- Joined
- Feb 18, 2013
- Messages
- 75
Afternoon all,
I have been working on a Userform for quite a while now and with your help have it almost ready for use. I am however having trouble transferring multiple rows of data from Listbox to a single cell in a Workbook.
The code I am using at present only transfers the last item in the listbox. I am trying to have all of the items added without having to select each line individually.
The code i am currently using is this:
thanks
Steve
I have been working on a Userform for quite a while now and with your help have it almost ready for use. I am however having trouble transferring multiple rows of data from Listbox to a single cell in a Workbook.
The code I am using at present only transfers the last item in the listbox. I am trying to have all of the items added without having to select each line individually.
The code i am currently using is this:
Code:
totRows = Worksheets("Project Master").Range("A1").CurrentRegion.Rows.count
For i = 2 To totRows
If Trim(Worksheets("Project Master").Cells(i, 1)) = Trim(CmbFindProject.text) Then 'These lines are also used to add other data to the same worksheet
'this is the code I am using which only adds the last line of data in the list
For x = 0 To Me.lstILR.ListCount - 1
Worksheets("Project Master").Cells(i, 52).Value = Me.lstILR.List(x)
Next x
Exit For
End If
Next i
thanks
Steve