+ Reply to Thread
Results 1 to 5 of 5

Globally declare all lower case inputs to Uppercase

  1. #1
    Registered User
    Join Date
    10-05-2010
    Location
    London England
    MS-Off Ver
    Excel 2003
    Posts
    8

    Globally declare all lower case inputs to Uppercase

    Hi

    I once read an answer relating to my current question and i can't remember the solution or seem to find it on the net.
    I have a module with many many functions. Inputs into spread sheet cells could be an M for Male or and F for female. If some one inputs a lower case f then my code doesnt recognise the answer. I know how to type MaleorFemale = Uppercase(MaleOrFemale) however i have so many functions now to go down and make many changes in all the functions will be tedious and i might forget one, or overlook one, and its not just MaleOrfemale but other variables too that could be inputted as lower case and i want to recognise them as uppercase.
    Is there a way to globally declare all lower case inputs be recognised as upper case?

    Thanks in advance.

    Brian P

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Globally declare all lower case inputs to Uppercase

    UCase them? http://techonthenet.com/excel/formulas/ucase.php

  3. #3
    Registered User
    Join Date
    10-05-2010
    Location
    London England
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Globally declare all lower case inputs to Uppercase

    Hi all, me again.

    I just found the answer in a forum in a question posted by Sarah some time back.

    the answer is to put
    Option Compare Text
    at the top of the module


    thanks

    BP

  4. #4
    Registered User
    Join Date
    10-05-2010
    Location
    London England
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Globally declare all lower case inputs to Uppercase

    Thanks Marvin.

    Thats a help too.

    Cheers
    BP

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Globally declare all lower case inputs to Uppercase

    Here is what your really want.
    http://msdn.microsoft.com/en-us/libr...5f(VS.80).aspx

    I was 2 minutes late with the answer. Glad to learn it myself.

+ 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