Ou placer un message dans la macro

Boostez vos compétences Excel avec notre communauté !

Rejoignez Excel Downloads, le rendez-vous des passionnés où l'entraide fait la force. Apprenez, échangez, progressez – et tout ça gratuitement ! 👉 Inscrivez-vous maintenant !

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
 
- Navigue sans publicité
- Accède à Cléa, notre assistante IA experte Excel... et pas que...
- Profite de fonctionnalités exclusives
Ton soutien permet à Excel Downloads de rester 100% gratuit et de continuer à rassembler les passionnés d'Excel.
Je deviens Supporter XLD

Discussions similaires

Réponses
4
Affichages
155
Réponses
1
Affichages
323
Réponses
4
Affichages
363
Retour