| || |
I'm using the following function to check if an item exists in a list or not.
It works fine when the item is a number. However, if the item in a list is text (ex:All) the function returns a strange value:
Item 6 is
Does anyone know where/what am I doing wrong?
I think you just need quotes around "All", otherwise you're sending the function an uninitialized variable. (The -10002 is the value of E_NOT_FOUND, by the way, which is how you initialized the "found" variable.)
Charles Reace (charlesDOTreaceATverizonDOTnet)
"Forward!" he cried from the rear, and the front ranks died.
The generals sat, and the lines on the map moved from side to side.
(Roger Waters, "Us and Them")
[i]...Sound trumpets! Every trumpet in the host! / Sixty thousand, on these words, sound, so high the mountains sound, and the valleys resound.</i] (The Song of Roland)
No wonder you are the "Advanced Guru" (in quotes) ;-)
Thanks a lot. It works and thanks also for the lesson.