Bonjour,
C'est juste une déprotection de ta feuille avant écriture. Ce sera le plus simple.
Tu reprotèges ta feuille aussitôt.
Private Sub Valide_Click()
' dernière ligne
Ln = Sheets("Archive").Range("A" & Rows.Count).End(xlUp).Row + 1
If Me.ComboBox1 <> "" And OptionButton1 = True Then
'ARRIVEE DE L'ENTREPRISE
With Sheets("Archive")
.Unprotect Password:=""
.Cells(Ln, "A") = Me.ComboBox1.Value
.Cells(Ln, "B") = Date
.Cells(Ln, "C") = Label2.Caption 'h ARRIVEE
.Protect Password:=""
MsgBox " Information validée, merci."
End With
....
Si toutefois tu mets un mot de passe en protégeant ta feuille, il faudra également compléter le code par le mot de passe entre les guillemets.
Exemple pour le mot de passe "toto"
Private Sub Valide_Click()
' dernière ligne
Ln = Sheets("Archive").Range("A" & Rows.Count).End(xlUp).Row + 1
If Me.ComboBox1 <> "" And OptionButton1 = True Then
'ARRIVEE DE L'ENTREPRISE
With Sheets("Archive")
.Unprotect Password:="toto"
.Cells(Ln, "A") = Me.ComboBox1.Value
.Cells(Ln, "B") = Date
.Cells(Ln, "C") = Label2.Caption 'h ARRIVEE
.Protect Password:="toto"
MsgBox " Information validée, merci."
End With
...
Espérant avoir résolu ton problème, bonne suite.
Cordialement