View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default lower and upper case equal on spreadsheet but not equal in VB

Don,

Add... "Option Compare Text" as the first line in your module.
For details look up "Option Compare" in vba help.

Jim Cone
San Francisco, USA



"don" wrote in message
...
I am trying to get these product identifiers and others similiar to it
to show as being equal. Code in the spreadsheet itself shows them
equal. Code in VBA shows them as being not equal.

RM92295A
rm92295a
RM92298A

If I write A1= A2 in the spreadsheet they show as TRUE , ie, equal.

However if I use this program in VBA they show as NOT EQUAL:
Set Item = cells(1,1)
Do Until Item.Offset(1, 0) < Item
Set Item = Item.Offset(1, 0)
'MsgBox Item.Row
Loop
This data is being copied from a Lotus Approach database if that is
relevant.
Thanks for anyone's help to solve this.
Don