corazul333
Messages postés12Date d'inscriptionmardi 10 janvier 2006StatutMembreDernière intervention21 mars 2006
-
15 mars 2006 à 08:42
PhilocheMan
Messages postés55Date d'inscriptionjeudi 28 juillet 2005StatutMembreDernière intervention23 mars 2006
-
15 mars 2006 à 12:33
Bonjour,
Voilà j'ai un petit bout de programme avec plein de IF, ce que je voudrai c'est que si aucune des conditions soient remplies label12 affiche l'alarme (Label12 = "a" & " "& "l" & " "&"a" &" "&.......)
Voilà le programme :
If Text2.Text > 0 Then
If Label11 > Text2.Text Then
'calcul du nombre de remplissage par jour
Label22 = 1 / Label11
'calcul du nombre de remplissage pour un mois
Label24 = 30 / Label11
'calcul du nombre de remplissage pour un an
Label26 = 365 / Label11
'CALCUL DE LA QUANTITE DE LIQUIDE
Label16 = Text3 * Label22
Label18 = Text3 * Label24
Label20 = Text3 * Label26
End If
End If
If Text2 > 0 Then
If Label11 = Text2 Then
If Label9 > Text1 Then
If Label32 > Text5 Then
Label22 = 1 / Label11
Label24 = 30 / Label11
Label26 = 365 / Label11
Label16 = Text3 * Label22
Label18 = Text3 * Label24
Label20 = Text3 * Label26
End If
End If
End If
End If
If Label11 > 0 Then
If Text2.Text = 0 Then
Label22 = 1 / Label11
Label24 = 30 / Label11
Label26 = 365 / Label11
Label16 = Text3 * Label22
Label18 = Text3 * Label24
Label20 = Text3 * Label26
End If
End If
'FAIRE LES OPERATIONS SUIVANTES SI JOURS=0 ET SI L'INTERVALLE DE REMPLISSAGE EST PLUS GRAND
'QUE CELUI ENTRE PAR L'UTILISATEUR
If Text2 = 0 Then
If Label11 = 0 Then
If Label9 > Text1 Then
If Label32 > Text5 Then
'conversion de l'intervalle calculé en secondes
converh = Label9 * 3600
convermin = Label32 * 60
sec = Label29
conversion = converh + convermin + sec
'division pour connaître combien il ya de jours dans Conversion
'calcul du nombre de remplissages
divi = conversion / 86400
Label22 = 1 / divi
Label24 = 30 / divi
Label26 = 365 / divi
'CALCUL DE LA QUANTITE DE LIQUIDE
Label16 = Text3 * Label22
Label18 = Text3 * Label24
Label20 = Text3 * Label26
End If
End If
End If
End If
Si aucune des conditions précédentes ont été remplies je voudrai à ce moment là faire apparaître l'alarme dans le label12.
En espérant avoir été asser clair.Merci
PhilocheMan
Messages postés55Date d'inscriptionjeudi 28 juillet 2005StatutMembreDernière intervention23 mars 20061 15 mars 2006 à 12:33
Salut,
Tu peux aussi utiliser l'opérateur logique AND pour vérifier qu'aucune condition n'est remplie :
if (condition1 AND condition2 AND condition3) then
label12 = "ALARME"
else
label12 = vbnullstring
endif