Hi there,
I have a userform that currently locates a particular cell (value) when I push the find button. Im a little stuck, bacause when I input a number not in the column (or blank for that matter).
I get the error "Select method of Range Class failed".
Does anyone know how to do a check to see if the value exists in the column, and if not prompt the user that the number is invalid and to re-enter.
Here's the code I have so far:
I think I need a while loop here but am not too familiar with them yet. Thanks in advance.
I have a userform that currently locates a particular cell (value) when I push the find button. Im a little stuck, bacause when I input a number not in the column (or blank for that matter).
I get the error "Select method of Range Class failed".
Does anyone know how to do a check to see if the value exists in the column, and if not prompt the user that the number is invalid and to re-enter.
Here's the code I have so far:
Code:
Private Sub FindButton_Click()
Worksheets("Records").Range("A:A").Find(TransactionNoBox.Value).Select ' This finds my value
TransactionNumberForm.Hide
DeleteConfirmationForm.Show
End Sub
I think I need a while loop here but am not too familiar with them yet. Thanks in advance.