re,
j'ai trouvé ça :
Sub commentaire()
recl = ""
Date_Precise = #6/1/2013#
Date_Max = DateSerial(Year(Date), Month(Date) + 0, -1)
For i = 6 To 1200
If Sheets("Feuil2").Range("G" & i).Value >= Date_Precise And _
Sheets("Feuil2").Range("G" & i).Value < Date_Max And Cells(i, "G").Comment Is Nothing Then
recl = recl & vbNewLine & Range("A" & i) & Space(1) & Range("B" & i) & Space(3) & Range("C" & i) & Space(3) & Range("D" & i) & Space(3) & Range("E" & i)
End If
Next i
If recl <> "" And Not ThisWorkbook.ReadOnly And (Cells(10, 7).Comment Is Nothing) Then
MsgBox ("Suivi du stagiaire en chaine 6 des mois précédents, Serrage au couple :" & vbNewLine & recl)
Else
End If
End Sub
Maintenant le soucis c'est que si je rajoute un nom avec la date dépassé et que je ne mets pas le commentaire, il ne me l'affiche pas. (Voir fichier)
Cdlt.
Re,
Merci à toi Gmb pour ton aide j'ai trouvé mon erreur.
Voici le bon code pour ceux que ça intéresse :
Option Explicit
Dim recl, Date_Precise, Date_Max
Dim i, j
Sub commentaire()
recl = ""
Date_Precise = #6/1/2013#
Date_Max = DateSerial(Year(Date), Month(Date) + 0, -1)
For i = 6 To Range("a65536").End(xlUp).Row
If Sheets("Feuil2").Range("G" & i).Value >= Date_Precise And _
Sheets("Feuil2").Range("G" & i).Value < Date_Max And Cells(i, "G").Comment Is Nothing Then
recl = recl & vbNewLine & Range("A" & i) & Space(1) & Range("B" & i) & Space(3) & Range("C" & i) & Space(3) & Range("D" & i) & Space(3) & Range("E" & i)
End If
Next i
If recl <> "" And Not ThisWorkbook.ReadOnly Then
MsgBox ("Suivi du stagiaire en chaine 6 des mois précédents, Serrage au couple :" & vbNewLine & recl)
Else
End If
End Sub
Cdlt.
Et encore merci Gmb.