[COLOR="DarkSlateGray"][B]Sub test()
Sheets("feuil1").Select
Range("g8").Select
If ActiveCell.[COLOR="Red"]Value [/COLOR]< 8 Then
MsgBox (" A L A R M !!! DEPECHE TOI !!!")
Else
MsgBox (" RELAX TU AS LE TEMPS !!!!!")
End If
End Sub[/B][/COLOR]
fera l'affaire.
Plus simplement :
Code:
[COLOR="DarkSlateGray"][B]Sub test()
If Sheets("feuil1").Range("g8").Value < 8 Then
MsgBox (" A L A R M !!! DEPECHE TOI !!!")
Else
MsgBox (" RELAX TU AS LE TEMPS !!!!!")
End If
End Sub[/B][/COLOR]
Plus court :
Code:
[COLOR="DarkSlateGray"][B]Sub test()
MsgBox IIf(Sheets("feuil1").Range("g8").Value < 8, " A L A R M !!! DEPECHE TOI !!!", " RELAX TU AS LE TEMPS !!!!!")
End Sub[/B][/COLOR]