vbs数组的使用

mu_Choose = "3"



Dim i, sMethod

if IsNumeric(mu_Choose) Then

    i = CInt(mu_Choose)

    if i < 1 or i > 4 Then

        i = 0

    end if

else

    i = 0

end if



sMethod = Array("hh", "addition", "subtract", "multiply", "division")

'sMethod(0) = "hh"

'sMethod(1) = "addition"

'sMethod(2) = "subtract"

'sMethod(3) = "multiply"

'sMethod(4) = "division"



mu_sMethod = sMethod(i)

MsgBox mu_sMethod

你可能感兴趣的:(vbs)