+ Reply to Thread
Results 1 to 4 of 4

case sensitive string comparison

  1. #1
    Registered User
    Join Date
    02-03-2012
    Location
    Bangalore,India
    MS-Off Ver
    Excel 2007
    Posts
    13

    case sensitive string comparison

    Hi I am using strcomp method to compare the login id provided in the userform with the login id already present in the excel sheet

    I want to make this search case sensitive

    if i use Login ID is ABC and the excel sheet as abc, it should not allow me to login.

    Please Login or Register  to view this content.
    If StrComp(Trim(lgtxtbxlid.Value), Trim(varlid), vbTextCompare) = 0 Then

    i have even tried vbbinarycompare still it didnot work

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,420

    Re: case sensitive string comparison

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,607

    Re: case sensitive string comparison

    Did you try InStr( ?
    Ben Van Johnson

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,420

    Re: case sensitive string comparison

    Thanks for the rep.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Find word(s) within text string that matches a list of keywords - NOT case sensitive
    By gbm222 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2013, 02:15 AM
  2. Making COUNTIF Function Case-Sensitive for any string
    By p4carr in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-21-2013, 05:22 PM
  3. [SOLVED] non-case sensitive 'string' search?
    By intothewild in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-25-2012, 03:01 PM
  4. [SOLVED] SUMPRODUCT Or SUMIF - In case of Case sensitive???
    By lifeisaspreadsheet in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-28-2012, 07:57 AM
  5. [SOLVED] Case Sensitive w/ IF
    By jeffP in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 02-05-2006, 09:20 PM

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