I have a userform that finds the result of combo box then writes the data from the textbox to a worksheet. it works except the when i run the userform again it overwrites the previous data instead of finding the next blank column adjacent to the found value.
Private Sub CommandButton5_Click()
Dim rFind As Range
Dim lastcolumn As Integer
With Sheets("ap2").Columns(1)
Set rFind = .Find(What:=Me.ComboBox2.Value, LookAt:=xlWhole, MatchCase:=False, SearchFormat:=False)
rFind.Offset(, 1).Value = Me.TextBox17.Value
End With
Bookmarks