This code is part of a function thats is being called several times.
for r = 0 to 4
do until searchname.AtEndOfStream
lineData = lcase(searchname.ReadLine())
if instr(lineData,N(r))>0 then
if (r = 0) then
v = v + 1
elseif (r = 1) then
w = w + 1
elseif (r = 2) then
x = x + 1
elseif (r = 3) then
y = y + 1
elseif (r = 4) then
z = z + 1
end if
end if
loop
next
My problem is that it only considers r = 0
. I've tried ubound(N)
instead. I've also tried replacing the for (r = 0)
loop with five separate loops for v
, w
, x
, y
and z
. I've tried several other methods and different formatting too, but it still didn't work.