dpaton05
Well-known Member
- Joined
- Aug 14, 2018
- Messages
- 2,392
- Office Version
- 365
- 2016
- Platform
- Windows
Code:
Sub searchvba()
' Find the name in the range A9:A1000
Dim rgFound As Range
Set rgFound = Range("A9:A1000").Find("Bob")
rgFound.Select
End Sub
I have code here that searches in the range for Bob. How do I change it so it searches for the text in a text box instead? The name of the textbox is txtname.
Also, how could I change it again to search for the text in a cell?