大家好!请问在窗体中Application.Run变量宏名怎么用?
我在窗体中写了如下代码,Application.Run 提示 运行错误‘1004’ ,call 则正常,
Private Sub CommandButton1_Click()
Dim S1, S2
S1 = "UserForm1.A"
S2 = "A"
Call A '正常
Application.Run S1 ‘提示错误
Application.Run S2 ‘提示错误
End Sub
Sub A()
MsgBox ("我是A")
End Sub
Sub B()
MsgBox ("我是B")
End Sub
Sub C()
MsgBox ("我是C")
End Sub
Sub D()
MsgBox ("我是D")
End Sub
我在窗体中写了如下代码,Application.Run 提示 运行错误‘1004’ ,call 则正常,
Private Sub CommandButton1_Click()
Dim S1, S2
S1 = "UserForm1.A"
S2 = "A"
Call A '正常
Application.Run S1 ‘提示错误
Application.Run S2 ‘提示错误
End Sub
Sub A()
MsgBox ("我是A")
End Sub
Sub B()
MsgBox ("我是B")
End Sub
Sub C()
MsgBox ("我是C")
End Sub
Sub D()
MsgBox ("我是D")
End Sub