johan4b
09-14-2016, 06:43 AM
Can somebody help me with this code.
I want that vba stops incrementing when the value in b4 is Yes.
Can someone tell what i did wrong
thank you
Private Sub CommandButton4_Click()
For intCount = 15 To 150
Range("B2") = intCount
If (intCount = Range("B4")) = "YES" Then
Range("B2") = "YES"
intCount = 150
End If
Next intCount
End Sub
I want that vba stops incrementing when the value in b4 is Yes.
Can someone tell what i did wrong
thank you
Private Sub CommandButton4_Click()
For intCount = 15 To 150
Range("B2") = intCount
If (intCount = Range("B4")) = "YES" Then
Range("B2") = "YES"
intCount = 150
End If
Next intCount
End Sub