thomassc
Messages postés16Date d'inscriptionmardi 27 juillet 2010StatutMembreDernière intervention20 avril 2011
-
13 août 2010 à 17:37
cs_casy
Messages postés7741Date d'inscriptionmercredi 1 septembre 2004StatutMembreDernière intervention24 septembre 2014
-
13 août 2010 à 17:52
Bonjour, j'ai un souci avec ce bout de code caché derriere un bouton. A l'exécution il m'envoi un messsageg d'erreur "block if without end if",
pouvez vous m'aider svp ?
Private Sub verifier_Click()
' vérifie si la date et (<=) et renvoi "Alarm !"
If (List2.List(0) <= Date) Then
A1.Caption = "Alarm !"
If (List2.List(1) <= Date) Then
A2.Caption = "Alarm !"
If List2.List(2) = Date Then
A3.Caption = "Alarm !"
If List2.List(2) = Date Then
A4.Caption = "Alarm !"
Else
' renvoi "En cours si la date est (>) à la date du jour
If (List2.List(0) > Date) Then A1.Caption = "En cours..."
If (List2.List(1) > Date) Then A2.Caption = "En cours..."
If (List2.List(2) > Date) Then A3.Caption = "En cours..."
If (List2.List(3) > Date) Then A4.Caption = "En cours..."
End If
cs_casy
Messages postés7741Date d'inscriptionmercredi 1 septembre 2004StatutMembreDernière intervention24 septembre 201440 13 août 2010 à 17:52
Ton code devrais plutôt ressembler à ceci
If (List2.List(0) <= Date) Then
A1.Caption = "Alarm !"
Else
A1.Caption = "En cours..."
End if
If (List2.List(1) <= Date) Then
A2.Caption = "Alarm !"
Else
A2.Caption = "En cours..."
End if
If List2.List(2) = Date Then
A3.Caption = "Alarm !"
Else
A3.Caption = "En cours..."
End if
If List2.List(2) = Date Then
A4.Caption = "Alarm !"
Else
A4.Caption = "En cours..."
End if
[i][b]---- Sevyc64 (alias Casy) ----
[hr]# LE PARTAGE EST NOTRE FORCE #/b/i