S
Soniya
Hi All,
I have the following code to search all the sheets in my
workbook for a give text in my userform1 textbox1
How can I get the code to search last charecters only
based on my textbox1.text.
i want get the code modified to get something like this.
if y=len(textbox1.text)
I want to search SStr in right(B:B ,y)
How I could modify my code to get this?
Sub SearchTkt()
Application.ScreenUpdating = False
sStr = textbox1.Text
For Each sh In ThisWorkbook.Worksheets
If sStr <> "" Then
Set rng = Nothing
Set rng = sh.Range("B:B").Find(What:=sStr, _
After:=sh.Range("B1"), _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
End If
TIA
Soniya
I have the following code to search all the sheets in my
workbook for a give text in my userform1 textbox1
How can I get the code to search last charecters only
based on my textbox1.text.
i want get the code modified to get something like this.
if y=len(textbox1.text)
I want to search SStr in right(B:B ,y)
How I could modify my code to get this?
Sub SearchTkt()
Application.ScreenUpdating = False
sStr = textbox1.Text
For Each sh In ThisWorkbook.Worksheets
If sStr <> "" Then
Set rng = Nothing
Set rng = sh.Range("B:B").Find(What:=sStr, _
After:=sh.Range("B1"), _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
End If
TIA
Soniya