2

如果我有以下代码:

Select Case Number

  Case 1: Call Subroutine1()
  Case 2: Call Subroutine2()
  Case 3: Call Subroutine3()
  Case 4: Call Subroutine4()
  Case 5: Call Subroutine5()
  Case 6: Call Subroutine6()

End Select

我想在案例 1 中调用几个子例程:

如何做呢?

最好的,美国

4

3 回答 3

3
Select Case Number

  Case 1: 
    Call Subroutine1a()
    Call Subroutine1b()
    Call Subroutine1c()

  Case 2: Call Subroutine2()
  Case 3: Call Subroutine3()
  Case 4: Call Subroutine4()
  Case 5: Call Subroutine5()
  Case 6: Call Subroutine6()

End Select
于 2011-06-15T13:32:18.397 回答
0

像这样:

Select Case Number

  Case 1: 
      Call Subroutine1a()
      Call Subroutine1b()
  Case 2: Call Subroutine2()
  Case 3: Call Subroutine3()
  Case 4: Call Subroutine4()
  Case 5: Call Subroutine5()
  Case 6: Call Subroutine6()

End Select
于 2011-06-15T13:32:00.943 回答
-1

您可以在每个 Case 匹配中添加任意数量的语句;

Select Case Number
  Case 1
    Call Subroutine1()
    Call Subroutine2()
  Case 2: Call Subroutine2()
  ...
于 2011-06-15T13:32:01.117 回答