Hello...

I'm trying to write a VBA script that will try to find a string
VB Code:
  1. strtemp
in Row "B" of "Sheet1".

Essentially, I'm trying to do data entry validation for the worksheet, and I need to make sure the record doesn't already exist. Soooo...

I've created a form with a button to "search". I'd like the search to go through every record in "Sheet1" , Column "B" to see if any of the text matches the string strtemp. If it does, I would like it to "jump" to that row and prompt for a "continue/cancel".

If the user presses continue, keep searching until the last row is reached.
If the user presses cancel, bomb out.

Can someone help me with this? I'm desperate!
So far, my meager attempt is:
VB Code:
  1. Dim tempSMTP As String
  2. tempSMTP = txtSMTP.Text
  3.  
  4. 'test code
  5. 'MsgBox "Searching for... " & tempSMTP & ".", vbOKOnly
  6. With Worksheets("Sheet1").Range("B:B").Find(tempSMTP, LookIn:=xlValues)
  7.  
  8. End With