non case specific

  • Thread starter Thread starter mike allen
  • Start date Start date
M

mike allen

my code reads:
if variable1 = "excluded" then
call abc
else
call def
end if

my problem is 'variable1' is typed in by users and can be 'Excluded',
'EXCLUDED', and other combinations of caps and lower case letters. I want
to include any and all combination of upper and lower case letters, as long
as the spelling is correct. I am sure there is something I can wrap around
'variable1', but I don't know it. Thanks, Mike Allen
 
There are options re case sensitivity set for the module via Option statements
at the top. The simplest solution to you current question is to use

If LCase$(Variable1) = "excluded" Then
 
As convention I always use Ucase but you could use lcase

if lcase(variable1) = "excluded" then

Chips web link gives you a lot more info on this kind of thing though... You
should take a look at it.

HTH
 
if lcase(variable1) = "excluded" then
call abc
else
call def
end if
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top