Find Number On Active Sheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All

I have a TextBox on a Userform TB1 I want to enter a number in the text box
click a CommandButton Com1 and find a number listed in column F - starting
from Row3 and ending in Row94 using the active sheet in the workbook. The
numbers are set to Text because I use a lot of leading zero's (any way of
getting rid of that annoying green tag on each cell) Is it possible to have a
macro that will do this and if so can you please guide me in the right
direction.
 
Sue,
Re: "that annoying green tag"
On the Tools menu, click Options and then click the Error Checking tab.
Clear the Enable background error checking check box.

Re: "macro that will do this"
The 'match' function can be use with code by using a prefix...
Application.WorksheetFunction.Match
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Sue" <[email protected]>
wrote in message
Hi All
I have a TextBox on a Userform TB1 I want to enter a number in the text box
click a CommandButton Com1 and find a number listed in column F - starting
from Row3 and ending in Row94 using the active sheet in the workbook. The
numbers are set to Text because I use a lot of leading zero's (any way of
getting rid of that annoying green tag on each cell) Is it possible to have a
macro that will do this and if so can you please guide me in the right
direction.
 
have your button code call:

Sub findit(s As String)
Set r = Intersect(ActiveSheet.UsedRange, Range("F3:F94"))
For Each rr In r
If rr.Value = s Then
rr.Select
Exit Sub
End If
Next
End Sub

where s will be the value sought
 
Hi Gary

Re; where will the value be sought : I have 3 other TextBoxes and on finding
the info entered in TB1. I wanted these TextBoxes to fill with the info from
the sheet. e.g

TB1 finds the info on Row70 therefore
TB2 = the Value in cell D70
TB3 = the value in cell C70
TB4 = the value in cell B70

I can then find out quickly who sold what to whom.

The problem also is that the commandbutton "Find1" is normally a click
procedure, I have tried but I don't know how to call or attach the code to it.

Just a learner trying to make things easier for myself.
 
Back
Top