test didattici con VBA
ritorna con
testvba.htm


test4zoologia.ppt

riconoscimento del tipo di animale al quale appartengono esempi di
animali indicate dal loro nome(ogni nome è codificato da un numero
da usare per le risposte)



Private Sub CommandButton11_Click()
Dim a1, ax1 As Integer
a1 = TextBox1
ax1 = 3
If a1 = ax1 Then
ListBox2.AddItem (1 & " esatto")
Else
ListBox2.AddItem (1 & " errato : esatta era : " & ax1)
End If
End Sub

Private Sub CommandButton12_Click()
Dim a2, ax2 As Integer
a2 = TextBox2
ax2 = 2
If a2 = ax2 Then
ListBox2.AddItem (2 & " esatto")
Else
ListBox2.AddItem (2 & " errato : esatta era : " & ax2)
End If
End Sub

Private Sub CommandButton13_Click()
Rem domanda 3
Dim a3, ax3 As Integer
a3 = TextBox3
ax3 = 4
If a3 = ax3 Then
ListBox2.AddItem (3 & " esatto")
Else
ListBox2.AddItem (3 & " errato : esatta era : " & ax3)
End If
End Sub

Private Sub CommandButton14_Click()
Rem domanda 4
Dim a4, ax4 As Integer
a4 = TextBox4
ax4 = 1
If a4 = ax4 Then
ListBox2.AddItem (4 & " esatto")
Else
ListBox2.AddItem (4 & " errato : esatta era : " & ax4)
End If
End Sub

Private Sub CommandButton15_Click()
Rem domanda 5
Dim a5, ax5 As Integer
a5 = TextBox5
ax5 = 2
If a5 = ax5 Then
ListBox2.AddItem (5 & " esatto")
Else
ListBox2.AddItem (5 & " errato : esatta era : " & ax5)
End If
End Sub

Private Sub CommandButton16_Click()
Rem domanda 6
Dim a6, ax6 As Integer
a6 = TextBox6
ax6 = 4
If a6 = ax6 Then
ListBox2.AddItem (6 & " esatto")
Else
ListBox2.AddItem (6 & " errato : esatta era : " & ax6)
End If
End Sub

Private Sub CommandButton17_Click()
Rem domanda 7
Dim a7, ax7 As Integer
a7 = TextBox7
ax7 = 3
If a7 = ax7 Then
ListBox2.AddItem (7 & " esatto")
Else
ListBox2.AddItem (7 & " errato : esatta era : " & ax7)
End If
End Sub

Private Sub CommandButton18_Click()
Rem domanda 8
Dim a8, ax8 As Integer
a8 = TextBox8
ax8 = 2
If a1 = ax1 Then
ListBox2.AddItem (8 & " esatto")
Else
ListBox2.AddItem (8 & " errato : esatta era : " & ax8)
End If
End Sub

Private Sub CommandButton19_Click()
Rem domanda 9
Dim a9, ax9 As Integer
a9 = TextBox9
ax9 = 1
If a9 = ax9 Then
ListBox2.AddItem (9 & " esatto")
Else
ListBox2.AddItem (9 & " errato : esatta era : " & ax9)
End If
End Sub

Private Sub CommandButton20_Click()
Rem domanda 10
Dim a10, ax10 As Integer
a10 = TextBox10
ax10 = 4
If a10 = ax10 Then
ListBox2.AddItem (10 & " esatto")
Else
ListBox2.AddItem (10 & " errato : esatta era : " & ax10)
End If
End Sub

Private Sub CommandButton21_Click()
Label4.Visible = True
End Sub

Private Sub CommandButton22_Click()
Label4.Visible = False
End Sub

Private Sub CommandButton6_Click()
Rem numero domande totale= 10
Rem numero domande = 1,2,3,4,5
Rem risposte per domanda 1,2,3,4
Rem risposte valide ax 1,2,3,4
Rem modificabile numero domande modificando textbox1 e If
Rem modificabile numero domande con pulsanti nuovi simili a 1,2,3,4,5
Rem mostra domande(
sezione con nuovi dati)
ListBox1.AddItem ("prima domanda")
ListBox1.AddItem ("indica rettile 1,2,3,4 ?")
ListBox1.AddItem ("1 lumaca")
ListBox1.AddItem ("2 ragno")
ListBox1.AddItem ("3 lucertola")
ListBox1.AddItem ("4 farfalla")
ListBox1.AddItem ("------------------------------")
ListBox1.AddItem ("seconda domanda")
ListBox1.AddItem ("indica anfibio 1,2,3,4 ?")
ListBox1.AddItem ("1 balena")
ListBox1.AddItem ("2 salamandra")
ListBox1.AddItem ("3 medusa")
ListBox1.AddItem ("4 riccio")
ListBox1.AddItem ("------------------------------")
ListBox1.AddItem ("terza domanda")
ListBox1.AddItem ("indica insetto 1,2,3,4 ?")
ListBox1.AddItem ("1 passero")
ListBox1.AddItem ("2 lombrico")
ListBox1.AddItem ("3 scolopendra")
ListBox1.AddItem ("4 dorifora")
ListBox1.AddItem ("------------------------------")
ListBox1.AddItem ("quarta domanda")
ListBox1.AddItem ("indica echinoderma e 1,2,3,4 ?")
ListBox1.AddItem ("1 ofiura")
ListBox1.AddItem ("2 ostrica")
ListBox1.AddItem ("3 corallo")
ListBox1.AddItem ("4 salmone")
ListBox1.AddItem ("------------------------------")
ListBox1.AddItem ("quinta domanda")
ListBox1.AddItem ("indica gasteropode 1,2,3,4 ?")
ListBox1.AddItem ("1 gambero")
ListBox1.AddItem ("2 lumaca")
ListBox1.AddItem ("3 orbettino")
ListBox1.AddItem ("4 farfalla")
ListBox1.AddItem ("------------------------------")

ListBox1.AddItem ("sesta domanda")
ListBox1.AddItem ("indica pesce 1,2,3,4 ?")
ListBox1.AddItem ("1 tritone")
ListBox1.AddItem ("2 loricato")
ListBox1.AddItem ("3 anuro")
ListBox1.AddItem ("4 salmone")
ListBox1.AddItem ("------------------------------")

ListBox1.AddItem ("settima domanda")
ListBox1.AddItem ("indica sauri 1,2,3,4 ?")
ListBox1.AddItem ("1 vipera")
ListBox1.AddItem ("2 trataruga")
ListBox1.AddItem ("3 ramarro")
ListBox1.AddItem ("4 acaro")
ListBox1.AddItem ("------------------------------")

ListBox1.AddItem ("ottava domanda")
ListBox1.AddItem ("indica crostacei 1,2,3,4 ?")
ListBox1.AddItem ("1 ragno")
ListBox1.AddItem ("2 aragosta")
ListBox1.AddItem ("3 coccinella")
ListBox1.AddItem ("4 ostrica")
ListBox1.AddItem ("------------------------------")

ListBox1.AddItem ("nona domanda")
ListBox1.AddItem ("indica aracnidi 1,2,3,4 ?")
ListBox1.AddItem ("1 scorpione")
ListBox1.AddItem ("2 gambero")
ListBox1.AddItem ("3 carabide")
ListBox1.AddItem ("4 lontra")
ListBox1.AddItem ("------------------------------")

ListBox1.AddItem ("decima domanda")
ListBox1.AddItem ("indica celenterati 1,2,3,4 ?")
ListBox1.AddItem ("1 donnola")
ListBox1.AddItem ("2 squalo")
ListBox1.AddItem ("3 bivalve")
ListBox1.AddItem ("4 medusa")
ListBox1.AddItem ("------------------------------")

End Sub

Private Sub CommandButton7_Click()
Rem cancella risposte
TextBox1 = ""
TextBox2 = ""
TextBox3 = ""
TextBox4 = ""
TextBox5 = ""
TextBox6 = ""
TextBox7 = ""
TextBox8 = ""
TextBox9 = ""
TextBox10 = ""

End Sub

Private Sub CommandButton8_Click()
Rem cancella domande
ListBox1.Clear
End Sub

Private Sub CommandButton9_Click()
Rem cancella esiti
ListBox2.Clear
End Sub


Private Sub UserForm_Click()

End Sub