代码: Private Sub Command1_Click() a = MsgBox("真的要退出程序吗?", 4 + 48 + 256, "退出对话框") If a = 6 Then End End If End Sub Private Sub Command2_Click() Text1.Text = "": Text2.Text = "": Text3.Text = "" End Sub Private Sub Command3_Click() Text3.Text = Val(Text1.Text) + Val(Text2.Text) End Sub Private Sub Command4_Click() Text3.Text = Val(Text1.Text) - Val(Text2.Text) End Sub Private Sub Command5_Click() Text3.Text = Val(Text1.Text) * Val(Text2.Text) End Sub Private Sub Command6_Click() Text3.Text = Val(Text1.Text) / Val(Text2.Text) End Sub Private Sub Command7_Click() Text3.Text = Val(Text1.Text) * Val(Text1.Text) End Sub Private Sub Command8_Click() Text3.Text = Val(Text1.Text) / Val(Text2.Text) * 100 End Sub Private Sub Command9_Click() Text3.Text = Val(Text1.Text) * Val(Text2.Text) End Sub