I have created a Userform and after updating details in the form, on clicking OK (command button) i want the user form to populate the details in a Textbox.
However, there will be multiple lines that i would want to update in the text box. So after clicking OK once, the text box would be updated. Then i would fill in different details in the form and after clicking OK again, another line would get created in the same text box.
Can someone please help.
This is my current OK button Code.
Code:
Private Sub OKButton_Click()
Dim emptyRow As Long
'Make Sheet1 Active
Sheets(1).Activate
'Determine EmptyRow
emptyRow = WorksheetFunction.CountA(Range("A:A")) + 1
'Export Data to worksheet
Cells(emptyRow, 1).Value = COB_Date.Value
Cells(emptyRow, 2).Value = Client_Name.Value
Cells(emptyRow, 3).Value = NameTextBox.Value
Cells(emptyRow, 4).Value = Disputed_Amount.Value
End Sub
Bookmarks