I am trying to have a spreadsheet enter the value of the NameTextBox into a cell if a selection in XYZComboBox is selected. However, when the code is run nothing happens. There are no errors indicated but still nothing appears in the selected box. The box that I would like the value to appear in moves down one row every time new data is entered which is why it is located using the find function. Any help would be greatly appreciated.
Private Sub OKButton_Click()
If Me.XYZComboBox.Value = "ABC" Then
Range(Cells.Find(what:="ABC").Address).Activate
Range(ActiveCell.Offset(0, 1)).Value = NameTextBox.Value
End If
end sub
Private Sub OKButton_Click()
If Me.XYZComboBox.Value = "ABC" Then
Range(Cells.Find(what:="ABC").Address).Activate
Range(ActiveCell.Offset(0, 1)).Value = NameTextBox.Value
End If
end sub