[求助]高手进来看看~
Public Function mycount(s1 as string, s2 as string) as integerdim i as integer
dim icount as integer
i=1
DO
if (i>len(s1))then
exit Do
End Do
End if
i=Instr(i,s1,s2,vbtextcompare)
if i then
icount=icount+1
i=i+2
doevents
end if
loop while i
mycount=icount
end function
debug.print mycount("visualbasic","a")
有人能帮我翻译上面每条语句的意思吗?~~~
其中i=i+2为什么是+2,怎么不是应该+1吗?
doevents又是什么意思?
if i then中的i是指i不为假或0的时候成立吗?