Private Sub CommandButton1_Click()
If Range("A1") = 0 Then
Range("A1") = 1
Exit Sub
End If
If Range("A1") > 0 Then
Range("B1") = 1
Exit Sub
End If
If Range("B1") > 0 Then
Range("C1") = 1
Exit Sub
End If
If Range("C1") > 0 Then
Range("D1") = 1
Exit Sub
End If
End Sub
I have tried the above code to input"1" to the next cell each time I click the button but it only does A1 and B1 then stops could someone explain why and maybe come up with an alternative Thanks
If Range("A1") = 0 Then
Range("A1") = 1
Exit Sub
End If
If Range("A1") > 0 Then
Range("B1") = 1
Exit Sub
End If
If Range("B1") > 0 Then
Range("C1") = 1
Exit Sub
End If
If Range("C1") > 0 Then
Range("D1") = 1
Exit Sub
End If
End Sub
I have tried the above code to input"1" to the next cell each time I click the button but it only does A1 and B1 then stops could someone explain why and maybe come up with an alternative Thanks