Your code is somewhat involved for someone who doesn't know how to change it. Did you write it yourself?
Attached is an update. This solves the basic problem that you posted about but you really need to take a breath and look at the rest of your code again.
Here are a few pointers:
I highly recommend using
as your first line of code (automatic with Tools, Options, Editor, Require Variable Declaration), so that variable declarations are required. This avoids the common bug of a typo in a variable name.
When using Find, you don't need to worry about restricting the range to rows containing data. Excel handles that quite efficiently.
You never have to use "With Me". Every property or object contained within the object containing the code (such as your user form) can be referenced without a dot. That is,
With Me
.TextBox2.Value = x
End With
' becomes
TextBox2.Value = x
You have several global variables declared. I can't figure out how you're using them without more analysis. I advise avoiding globals, although they have their place.
Name controls to something meaningful. I have renamed TextBox1 to textboxSearchString as an example.
Bookmarks