VBA字符串精确比较
我实在没想到在VBA里,(”abc” = “ABC”) = true。
为了debug这个被我认为 false的判断,我找了好久。找到了已经想通了,从DOS到Windows,微软不是一直在营造一种大小写不敏感的气氛吗?只是我没估计到从程序员这么严谨的角度,竟然也是忽略字符串大小写。可能我越来越Linux了,对Windows这一套哲学越来越不适应了。
不过,VBA里要精确比较字符串也是做得到的: StrComp(String1, String2, vbBinaryCompare).
Tags: vba, windows
This entry was posted
on Thursday, December 4th, 2008 at 12:57 am and is filed under 小小草.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.