Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text Box

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello,

Can someone help with this command.

Instead of Find "01" i want it to find a value in a text box on the same userform as this command.

msheet = ActiveSheet.Name
Select Case msheet
Case "BoQ"
Range("s3").Select
If ActiveCell.End(xlDown).Row < 65528 Then
Range(ActiveCell, ActiveCell.End(xlDown)).Select
End If
Selection.Find(What:=&quot;01&quot;, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
ActiveCell.Offset(0, -11).Select
End Select
End Sub

Cheers,

Keep it simple please

Andrew
 
Guessing again!
I haven't tested this but try What:=TextBox1.text

Are you definately looking in formulas??

;-) If a man says something and there are no women there to hear him, is he still wrong?
 
Thanks loomah

But it didn't work

And your right i'm not looking in formulas, i copied that line from another macro i recorded

Cheers

Any other thoughts
 
Another guess
try assigning it to a variable
ie strFindCrit = trim(textbox1.text)
what:=strFindCrit
probably won't make a difference!

What's actually going wrong coz I really am guessing. I haven't set up a text box to check this. These are just the things I'd start doing to try finding the answer.

try what:= textbox1.value

Try testing the find in isolation ie not within another load of code. What happens when you step thru (F8) the code?

;-) If a man says something and there are no women there to hear him, is he still wrong?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top