ОШИБКА : Else without If =Private Sub CommandButton1_Click()
Dim X As Single, Y As Single, Z As Single
X = TextBox1.Text
Y = TextBox2.Text
If X > Y + 5 Then
Z = X
Else
Z = Y + 5
ElseIf X + 1 < Y < 3 Then
Z = X + 1
Else
Z = Y
Else
Z = 3
ElseIf X = Y Then
Z = XY
End If
TextBox3.Text = Z
End Sub