option base 1Private sub command1_click()Dim a(), n as integer, dcount as longDoN = inputbox("输入n")Loop until n > 0Redim a(n)For I = 1 to nA(I) = int(90*rnd+10)If a(I) mod 2 = 0 then dcount=dcount+a(I)NextLabel1.caption=dcount希望对你有帮助。