LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 363
Default Why does this not work

I am trying to set this code to pick up IF the exact Text(sentance) match is found in Sheet2 Column
C,
is used in Textbox2 then i get a Prompt to Say so, else a Prompt to say NOT.

But why does it not work, although a MATCH is there ?


Private Sub TextBox2_Change()
With TextBox2.Value
Dim rngFound As Range
On Error Resume Next
With Worksheets("Sheet2").Range("C:C")
Set rngFound = .Find(What:=TextBox2.Text, After:=.Range("C1"), LookIn:=xlText, LookAt:=xlWhole,
SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, Matchbyte:=False)
If rngFound.Count < "" Then
MsgBox "That Item " & TextBox1.Value & " is ALREADY in the List of Items to be Done",
vbInformation
Else
Msgbox "None Found"
Exit Sub
End If
End With
End With
TextBox2.Value = UCase(TextBox2.Value)
End Sub


Corey....


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i automatically generate work order numbers from work orde rob h Excel Discussion (Misc queries) 1 July 13th 09 07:59 PM
flash object dont work in my excel work sheet Nitn Excel Discussion (Misc queries) 0 July 4th 09 08:00 AM
If I have a work sheet protected and try to run a macro to hide rows or columns it won't work. Correct? Marc Excel Programming 2 July 12th 06 04:10 AM
Counting dates in multiple work sheets and work books Savage Excel Discussion (Misc queries) 0 December 19th 05 11:41 PM
Is there away to keep "auto save" from jumping to the first work sheet in the work book? Marc New Users to Excel 2 April 21st 05 01:27 AM


All times are GMT +1. The time now is 09:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"