I have a textbox in my userform which has multiline properties available.
The user can enter more than one line of data in the text box and can enter a list such as the following:
Adam
Brian
Colin
David
I have the following code in the userform.
Dim avarSplit As Variant
Dim intIndex As Variant
avarSplit = Split((TextBox1), Chr(13))
For intIndex = LBound(avarSplit) To UBound(avarSplit)
LastRow = Cells(Rows.Count, 1).End(xlUp).Row + 1
Range("A" & LastRow).Value = avarSplit(intIndex)
Next
The data is split out, however, if there is more than one record it leaves a line gap.
I have attached an example to show what i mean.
Is there anyway I can get it so that each line that is entered in the userform is displayed exactly as one line in the relevant cell on the workbook?
Bookmarks