'define the the public-Array to store the position, 'then u can get the position through "mIntPosition(n)" constant conmax =100 dim mintPosition(conmax) as integer dim mintCount as integer'store the position function storePosition(strA as string , strChar as string b, intN as integer) dim i as intger micount=0 for i=1 to len(strchar) if mid(strA,i,1)= strchar then mintposition(miCount)=i micount=icount+1 endif next end function
'then u can get the position through "mIntPosition(n)" constant conmax =100
dim mintPosition(conmax) as integer
dim mintCount as integer'store the position
function storePosition(strA as string , strChar as string b, intN as integer)
dim i as intger micount=0
for i=1 to len(strchar)
if mid(strA,i,1)= strchar then
mintposition(miCount)=i
micount=icount+1
endif
next
end function
我也建议用function写,可以用此来返回位置。