PDA

View Full Version : Solved: Find,MatchCase PROBLEM



aysam
07-16-2010, 01:34 PM
Peace to you all
I have a code that looks for a number in a column
The numbers in the column are not in the correct order
332
256
147
33
158
70

Private Sub CommandButton1_Click()
On Error GoTo 100
Dim d
Dim ra As Range
Columns(2).Find(C, MatchCase:=True).Activate
A = MsgBox("Do you want to delete the data", 4)
If A = 6 Then ActiveCell.EntireRow.Delete
Exit Sub
100 MsgBox ("Error")
End Sub
the problem is
if I want to look for number ( 33 ) the code activates (332 )the first number that has 33
Any help 'd be greatly appreciated

Bob Phillips
07-16-2010, 01:49 PM
Add LookAt:=xlWhole argument to the Find.

aysam
07-16-2010, 02:08 PM
Thanks so much
That was great