Ou placer un message dans la macro

un internaute

XLDnaute Impliqué
Bonjour le forum,
Où placer le message suivant :

If Not IsError(Application.Match(CSng(Date), Columns("A"), 0)) Then
MsgBox "Une consultation éxite déjà à cette date"
Else

Dans la macro ci-dessous


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Not Intersect(Range("G3:G" & Rows.Count), Target) Is Nothing Then
Range("A" & Target.Row) = IIf(Target = "", "", Date)
Range("A" & Target.Row).Interior.ColorIndex = 36
End If
If Range("A" & Target.Row) = "" Then
Range("A" & Target.Row).Interior.ColorIndex = 8
End If
If Range("B" & Target.Row) = "" Then
Range("B" & Target.Row).Interior.ColorIndex = 8
End If
If Range("C" & Target.Row) = "" Then
Range("C" & Target.Row).Interior.ColorIndex = 8
End If
If Range("D" & Target.Row) = "" Then
Range("D" & Target.Row).Interior.ColorIndex = 8
End If
If Range("E" & Target.Row) = "" Then
Range("E" & Target.Row).Interior.ColorIndex = 8
End If
If Range("F" & Target.Row) = "" Then
Range("F" & Target.Row).Interior.ColorIndex = 8
End If
If Range("G" & Target.Row) = "" Then
Range("G" & Target.Row).Interior.ColorIndex = 8
End If

End Sub

Merci d'avance pour vos retours
Bonne journée à tous
 

Discussions similaires

Réponses
1
Affichages
191

Statistiques des forums

Discussions
314 188
Messages
2 106 979
Membres
109 733
dernier inscrit
chardou