Case-INsensitive Select...Case

Case-INsensitive Select...Case

Anonymous
Not applicable
303 Views
3 Replies
Message 1 of 4

Case-INsensitive Select...Case

Anonymous
Not applicable
I'm using Select...Case statements to deal with layer names and block names,
the problem is some blocks are created with all uppercase letters while
others use all lowercase. Some even use mixed case!!! This causes the
counter to incorrectly tally items or c ompletely skip entities I clearly
have in my drawing (they are visible). My question is, how do I tell the
Select...Case loop that CASE "pu-wat" is the same as CASE "PU-WAT" is the
same as CASE "Pu-Wat" without speeling out every possible combination of
upper/lower case letters? Thanks,
0 Likes
304 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
use the UCase function to convert your string to all uppercase before you
test with a Select... Case loop
then your Case statement can test for the all uppercase version only.

"Scott" wrote in message
news:B120667F300EDADD3830D54E18F6BF65@in.WebX.maYIadrTaRb...
> I'm using Select...Case statements to deal with layer names and block
names,
> the problem is some blocks are created with all uppercase letters while
> others use all lowercase. Some even use mixed case!!! This causes the
> counter to incorrectly tally items or c ompletely skip entities I clearly
> have in my drawing (they are visible). My question is, how do I tell the
> Select...Case loop that CASE "pu-wat" is the same as CASE "PU-WAT" is the
> same as CASE "Pu-Wat" without speeling out every possible combination of
> upper/lower case letters? Thanks,
>
>
>
>
0 Likes
Message 3 of 4

Anonymous
Not applicable
thanks,


"Corey A. Layton" wrote in message
news:16F779F6D1B976AAF7793AE2AAAE3B90@in.WebX.maYIadrTaRb...
> use the UCase function to convert your string to all uppercase before you
> test with a Select... Case loop
> then your Case statement can test for the all uppercase version only.
>
> "Scott" wrote in message
> news:B120667F300EDADD3830D54E18F6BF65@in.WebX.maYIadrTaRb...
> > I'm using Select...Case statements to deal with layer names and block
> names,
> > the problem is some blocks are created with all uppercase letters while
> > others use all lowercase. Some even use mixed case!!! This causes the
> > counter to incorrectly tally items or c ompletely skip entities I
clearly
> > have in my drawing (they are visible). My question is, how do I tell the
> > Select...Case loop that CASE "pu-wat" is the same as CASE "PU-WAT" is
the
> > same as CASE "Pu-Wat" without speeling out every possible combination of
> > upper/lower case letters? Thanks,
> >
> >
> >
> >
>
>
0 Likes
Message 4 of 4

Anonymous
Not applicable
Hi Scott,

If You put "Option Compare Text" in the declarations section of Your module,
then all text comparsions are done case insensitiv in the whole module.

/ Per Nilsson


"Scott" skrev i meddelandet
news:B120667F300EDADD3830D54E18F6BF65@in.WebX.maYIadrTaRb...
> I'm using Select...Case statements to deal with layer names and block
names,
> the problem is some blocks are created with all uppercase letters while
> others use all lowercase. Some even use mixed case!!! This causes the
> counter to incorrectly tally items or c ompletely skip entities I clearly
> have in my drawing (they are visible). My question is, how do I tell the
> Select...Case loop that CASE "pu-wat" is the same as CASE "PU-WAT" is the
> same as CASE "Pu-Wat" without speeling out every possible combination of
> upper/lower case letters? Thanks,
>
>
>
>
0 Likes