funzioni booleane

esempio di VBA con powerpoint per confrontare con VBA su excel
vedi
doppio4x.ppt

Private Sub CommandButton1_Click()
Rem doppio4x
a = 10
b = 20
c = 30
d = 40

If a < b Then
ListBox1.AddItem (b - a)
Else
ListBox1.AddItem (a * b)
End If

If a < b Then
ListBox1.AddItem (a * b)
Else
ListBox1.AddItem (a - b)
End If
If a < b And b < c And c < d Then
ListBox1.AddItem ("vero")
End If
If a < b And b > c Then
ListBox1.AddItem ("vero")
Else
ListBox1.AddItem ("falso")
End If
If a < b Or b > c Then
ListBox1.AddItem ("vero")
Else
ListBox1.AddItem ("falso")
End If
If a > b Or b > c Then
ListBox1.AddItem ("vero")
Else
ListBox1.AddItem ("falso")
End If
If Not a < b Then
ListBox1.AddItem ("vero")
Else
ListBox1.AddItem ("falso")
End If
If Not a > b Then
ListBox1.AddItem ("vero")
Else
ListBox1.AddItem ("falso")
End If

If a < b Then
TextBox1 = (b - a)
Else
TextBox1 = (a * b)
End If

If a < b Then
TextBox2 = (a * b)
Else
TextBox2 = (a - b)
End If
If a < b And b < c And c < d Then
TextBox3 = ("vero")
End If
If a < b And b > c Then
TextBox4 = ("vero")
Else
TextBox4 = ("falso")
End If
If a < b Or b > c Then
TextBox5 = ("vero")
Else
TextBox5 = ("falso")
End If
If a > b Or b > c Then
TextBox6 = ("vero")
Else
TextBox6 = ("falso")
End If
If Not a < b Then
TextBox7 = ("vero")
Else
TextBox7 = ("falso")
End If
If Not a > b Then
TextBox8 = ("vero")
Else
TextBox8 = ("falso")
End If

I
f a < b Then
Label1.Caption = (b - a)
Else
Label1.Caption = (a * b)
End If

If a < b Then
Label2.Caption = (a * b)
Else
Label2.Caption = (a - b)
End If
If a < b And b < c And c < d Then
Label3.Caption = ("vero")
End If
If a < b And b > c Then
Label4.Caption = ("vero")
Else
Label4.Caption = ("falso")
End If
If a < b Or b > c Then
Label5.Caption = ("vero")
Else
Label5.Caption = ("falso")
End If
If a > b Or b > c Then
Label6.Caption = ("vero")
Else
Label6.Caption = ("falso")
End If
If Not a < b Then
Label7.Caption = ("vero")
Else
Label7.Caption = ("falso")
End If
If Not a > b Then
Label8.Caption = ("vero")
Else
Label8.Caption = ("falso")
End If


End Sub

Private Sub CommandButton2_Click()
ListBox1.Clear
End Sub


indice