第1个回答 2009-08-09
量少用IF,量多用Case,看一下代码就很清楚了。
例1:量多时
sub command1_click(index as integer)
select case index
case 0
程序
case 1
程序
case 2
程序
else
end select
end sub
sub command1_click(index as integer)
if index=0 then
程序
elseif index=1 then
程序
elseif index=2 then
程序
else
程序
end if
end sub
量少时(这里就1个)
select case index
case 0
程序
else
程序
end select
if inde=0 then
程序
else
程序
end if