+ Reply to Thread
Results 1 to 2 of 2

Searching

  1. #1
    Registered User
    Join Date
    03-17-2005
    Posts
    11

    Searching

    Ok so I've got this code:

    If txtsearch.Value = Range("B2").Value Then
    Range("B2").Select
    Sheet1.Activate
    frmuser1.Hide
    frmuser.Hide
    End If

    If txtsearch was not in the same case as Range("B2"), is there anyway for them to be made equal?

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Nollaig,

    To make a case insensitive comparison you can convert both strings to either upper case or lower case by using UCase(String) or LCase(String) operators.

    Example:

    If LCase(txtsearch.Value) = LCase(Range("B2").Value) Then

    Hope this answers your question,
    Leith Ross
    Last edited by Leith Ross; 03-20-2005 at 07:07 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1