Consulting

Results 1 to 2 of 2

Thread: comparing text

  1. #1
    VBAX Tutor
    Joined
    Dec 2008
    Posts
    244
    Location

    comparing text

    can some help me with this. how do i compare wild cards if user input it into a text box. This does not work.

    MsgBox (search("textbox1").Value)
    If Range("B2").Value Like "*" & search("textbox1").Value & "*" Then
         MsgBox ("yes")
    End If

  2. #2
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    There are many options for searching wild cards in our own kb here http://www.vbaexpress.com/kb/getarticle.php?kb_id=843 or if you want a tutorial on using/finding them etc look here http://www.cpearson.com/excel/RangeFind.htm
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •