Hello
Sorry, if the title of this thread is not accurate.
I have the following code:
Code
Private Sub ComboBox1_Change()
Dim MMod As Range
Dim MFind As Range
Set MMod = Worksheets("Validate").Range("R2:R8")
For Each MFind In MMod
If MFind.Value = ComboBox1.Value Then
Sheets("Validate").Range("R1").Select
Do
If ActiveCell.Value = ComboBox1.Value = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until ActiveCell.Value = ComboBox1.Value
TextBox1.Value = ActiveCell.Offset(0, 1).Value
End If
Next MFind
End Sub
Display More
What I am trying to do is check if the value of the combobox equals the same as any of the Range MMod, and then find that Value in the Range and pass the value next to it to a textbox, - that bit works, however if the value of the combobox is not in Range MMod, then I want the textbox value to be "Zero".
If I put:
before NextMFind I always return "Zero"
What am I doing wrong please?