Bonjour,
A l'exécution de ma macro et suite à la protection des feuilles (où seules les cellules non protégées sont sélectionnables) la ligne en rouge présente un blocage, savez vous pourquoi svp ???
Sub MAJ_contrat()
Dim f1 As Worksheet, f2 As Worksheet, lig&, nvl&
Set f1 = Sheets("REF"): Set f2 = Sheets("BDD_contrats")
If Application.CountIf(f2.Columns(6), f1.Range("B12").Value) > 0 Then
Feuil2.Unprotect
Feuil1.Unprotect
lig = Application.Match(f1.Range("B12").Value, f2.Columns(6), 0)
f2.Range("F" & lig & ":FL" & lig).Value = f1.Range("B12:FH12").Value
Feuil2.Protect
Feuil1.Protect
Else
End If
End Sub