public const OPEN_FILE As Integer = 1 public const SEARCH_STRING As Integer = 2 public const BROWSER As Integer = 3 ....
然后,自己设计一个数据结构:
public type Action action_type as As Integer 参数1 参数2 .... end type
再用一个循环语句,对不同的事件做不同响应就行了 [解决办法] dim bStop as boolean
sub DoIt(Action() as string)'假设你的动作保存在Action数组中 dim i as long do while not bstop for i=0 to ubound(action) select case Action(i) case "动作1" 动作1过程 case "动作2" 动作2过程 case "动作3" 动作3过程 case "动作4" 动作4过程 case "动作5" 动作5过程 ........ end select next loop end sub