I want activate an input box (using VBOkCancel) if there is a zero or null value in a cell.
If per chance the user does not enter a number using the input box I want the the sub to select the cell and then exit the sub.
My problem is that the input box is not coming up empty. It has the value 1 in it which is interfering with the purpose of the sub. Here is the sub (BTW rFall is dimmed as integer) -
If per chance the user does not enter a number using the input box I want the the sub to select the cell and then exit the sub.
My problem is that the input box is not coming up empty. It has the value 1 in it which is interfering with the purpose of the sub. Here is the sub (BTW rFall is dimmed as integer) -
Code:
If Range("B21").Value = "" Then
rFall = Application.InputBox("Enter rainfall in mls", "Rainfall", vbOKCancel, 1)
If rFall = "" Then
Range("B21").Select
Exit Sub
Else
End If
Else
End If