子程序自动循环运行求教
Private Sub Command1_Click()Dim x As Integer, y
For y = 1 To 2
If Option3.Value = True Then
x = x + 5
Else
x = x
End If
clear
wt & y
Nexty
End Sub
我想要达成的是利用以上程序中的FOR循环自动运行wt加序号y的以下子程序(比如wt1,wt2),以上代码有错误 请高手帮忙修改一下。
以下为子程序:
Public Sub clear()
Label1.Caption = ""
Option1.Caption = ""
Option2.Caption = ""
Option3.Caption = ""
Option4.Caption = ""
End Sub
Public Sub wt1()
Label1.Caption = "公司有几种抢救台?"
Option1.Caption = "1种"
Option2.Caption = "2种"
Option3.Caption = "3种"
Option4.Caption = "4种"
End Sub
Public Sub wt2()
Label1.Caption = "公司暖箱有几种控温仪?"
Option1.Caption = "1种"
Option2.Caption = "2种"
Option3.Caption = "3种"
Option4.Caption = "4种"
End Sub