最初からのコードを全て書き出します。
Private Sub CommandButton1_Click() '変数宣言 Dim atai1 As Integer Dim atai2 As Integer Dim atai3 As Integer '入力 atai1 = a.Value atai2 = b.Value atai3 = c.Value '条件処理 If a > 80 Then MsgBox "よく出来ました" Else MsgBox "偏差値は普通です" End If If b > 180 Then MsgBox "背高いですね" Else MsgBox "身長は普通です" End If If c > 1000 Then MsgBox "高収入ですね" Else MsgBox "収入は普通です" End If End Sub Private Sub CommandButton2_Click() If (a > 80 And b > 180 And c > 1000) Then MsgBox "OKです!" Else MsgBox "次に方へ" End If End Sub Private Sub CommandButton3_Click() If (a > 80 Or b > 180 Or c > 1000) Then MsgBox "OKです!" Else MsgBox "次に方へ" End If End Sub
試しに一例を入力します!
偏差値は
身長は
収入は
A子さんは
以上で三高評価は終わりです!