View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
quartz[_2_] quartz[_2_] is offline
external usenet poster
 
Posts: 441
Default Using "InstrRev"

Excel XP with Windows 2000
When I use the following:

Dim strPath as String
Dim lngSlash1 as Long
strPath = "\\TEST1\TEST2\TEST3\TEST4\"
lngSlash1 = InStrRev(argFullName, "\", -1, vbTextCompare)

I would expect lngSlash1 to return 1 since the last character is a "\".
However, the above function returns 26 for me. I thought "InStrRev" was
supposed to return the position from the END of the string, not the beginning.
Where am I going wrong?

TIA.