View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
NickHK[_2_] NickHK[_2_] is offline
external usenet poster
 
Posts: 29
Default Sorting of text data different in Excel adn VBA? Office 2K3

ROCKnRLR,
If you put an "Option Compare Binary" at the top of the form/module, you get
False, "Option Compare Text" returns True.
VBA defaults to Binary, whereas Excel is Text.

NickHK

"ROCKnRLR " wrote in message
...
Hello guys, I found this forum by looking up the meaning of error 2042.
Thanks to you guys now I know that the value looked up is not found in
the range. And there it lies the problem!

I have a very large list from which the values can be looked up, so, I
created a small VBA function that breaks down the list in smaller
ranges and then using a Select statement it looks up a value within a
range.

If I put in Excel the following, the answer is TRUE:
= "EP102RB" < "EP-1080SD"

If I open an immediate window in VBA, the following returns FALSE:
PRINT "EP102RB" < "EP-1080SD"

How can that be? BTW, I never saw this happenign in 95, 97, 2K.


---
Message posted from http://www.ExcelForum.com/