I have a userform with multiple buttons and textboxes. Each one needs to find the current row of the combobox value, so I use the same code in each sub. I have found how to declare the variable once. Is there a way to simplify the rest? Thank you for any help.
Code:
MyVal = ComboBox1.Value
With Sheets("Sheet1").Range("A:A")
Set cell = .Find(MyVal, LookIn:=xlValues)
rw = cell.row
End With
On Error GoTo 0