if a = 1 then 事件A
elseif a = 2 then 事件B
elseif a = 3 then 事件C
elseif a = 4 then 事件D
elseif a = 5 then 事件E
endif
endif
endif
endif
endif
多分支判断的时候,可以用case语句:
转换为CASE 语句
select case a
case 1 事件A
case 2 事件B
case 3 事件C
case 4 事件D
case 5 事件E
end select
你这个就行啦