Aide pour modifier code

Bonjour,

Je ne vois comment introduire ce code :

If ThisWorkbook.ReadOnly Then MsgBox "Accès refusé !", vbOKOnly, "Attention": Sheets("Récapitulatif").Select

Dans celui ci :

recl = ""
Date_Min = DateSerial(Year(Date), Month(Date) + 1, 1)
Date_Max = DateSerial(Year(Date), Month(Date) + 2, 0)
For i = 6 To 1200
If Sheets("Récapitulatif").Range("G" & i).Value >= Date_Min And _
Sheets("Récapitulatif").Range("G" & i).Value <= Date_Max Then
recl = recl & vbNewLine & vbTab & Range("A" & i)
End If
Next i
If recl <> "" Then
MsgBox "Requalification du mois prochain :" & vbNewLine & recl, vbOKOnly, "Serrage au couple"
Else
End If

Cdlt.


Bonjour,

J'ai trouvé.

recl = ""
Date_Min = DateSerial(Year(Date), Month(Date) + 1, 1)
Date_Max = DateSerial(Year(Date), Month(Date) + 2, 0)
For i = 6 To 1200
If Sheets("Récapitulatif").Range("G" & i).Value >= Date_Min And _
Sheets("Récapitulatif").Range("G" & i).Value <= Date_Max Then
recl = recl & vbNewLine & vbTab & Range("A" & i)
End If
Next i
If Not ThisWorkbook.ReadOnly Then
If recl <> "" Then
MsgBox "Requalification du mois prochain :" & vbNewLine & recl, vbOKOnly, "Serrage au couple"
Else
End If
End If

Cdlt.

Rechercher des sujets similaires à "aide modifier code"