akramenergie
XLDnaute Occasionnel
Bonjour les amis
je dévellope une macro sous vba pour excel je veut rajouté un truc sur mon code te je sais pas comment faire je veut que lorsque ma macro détecte un planninge imcomplet elle me colore la ligne ou il ya la non comformité???
voila mon code
For k = 2 To 32
If Sheets("Feuil1").Range("D" & k).Value <> 0 Then
If Sheets("Feuil1").Range("D" & k).Value <= 20 Then
MsgBox "Planning Incomplet"
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
End With
'Sheets("Feuil1").Range("D" & k)
Else
MsgBox "ok"
End If
Else
End If
Next
End Sub
je dévellope une macro sous vba pour excel je veut rajouté un truc sur mon code te je sais pas comment faire je veut que lorsque ma macro détecte un planninge imcomplet elle me colore la ligne ou il ya la non comformité???
voila mon code
For k = 2 To 32
If Sheets("Feuil1").Range("D" & k).Value <> 0 Then
If Sheets("Feuil1").Range("D" & k).Value <= 20 Then
MsgBox "Planning Incomplet"
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
End With
'Sheets("Feuil1").Range("D" & k)
Else
MsgBox "ok"
End If
Else
End If
Next
End Sub