我正在构建一个在开始时接受数字的VB应用程序.如果用户在任何输入框中按下取消按钮,我希望能够退出.代码是:
Private Sub Command1_Click()
Dim a, b, c, d As Integer
Dim response As Integer
Dim a1, b1, c1, d1 As String
a = InputBox("Enter Numerator 1")
b = InputBox("Enter Denominator 1")
c = InputBox("Enter Numerator 2")
d = InputBox("Enter Denominator 2")
a1 = Str(a)
b1 = Str(b)
c1 = Str(c)
d1 = Str(d)
If a1 <> "" And b1 <> "" And c1 <> "" And d1 <> "" Then
'All Actions
...
Else
response = MsgBox("Are you sure …Run Code Online (Sandbox Code Playgroud)