J'ai ce qui suit:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 56 And Target.Count = 1 And Target.Value = "OK" Then
ActiveSheet.Unprotect
Range(Cells(Target.Row, 1), Cells(Target.Row, 56)).Locked = True
Range(Cells(Target.Row, 1), Cells(Target.Row,
56)).Interior.ColorIndex = 33
ActiveSheet.Protect
End If
End Sub
Quand je selectionne une seul cells pas de pb
mais qd je fais une selection multiple
et que je veux par ex effacer le contenu : BUG
Je ne sais quoi faire
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
JB
Bonjour,
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 56 And Target.Count = 1 Then If Target.Value = "OK" Then ActiveSheet.Unprotect Range(Cells(Target.Row, 1), Cells(Target.Row, 56)).Locked True Range(Cells(Target.Row, 1), Cells(Target.Row, 56)).Interior.ColorIndex = 33 ActiveSheet.Protect End If End If End Sub
JB
On 15 nov, 11:30, IMER09 wrote:
BONJOUR A TOUS
J'ai ce qui suit: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 56 And Target.Count = 1 And Target.Value = "OK" Then ActiveSheet.Unprotect Range(Cells(Target.Row, 1), Cells(Target.Row, 56)).Locked = True Range(Cells(Target.Row, 1), Cells(Target.Row, 56)).Interior.ColorIndex = 33 ActiveSheet.Protect End If End Sub Quand je selectionne une seul cells pas de pb mais qd je fais une selection multiple et que je veux par ex effacer le contenu : BUG Je ne sais quoi faire
Merci
-- IMER09
Bonjour,
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 56 And Target.Count = 1 Then
If Target.Value = "OK" Then
ActiveSheet.Unprotect
Range(Cells(Target.Row, 1), Cells(Target.Row, 56)).Locked True
Range(Cells(Target.Row, 1), Cells(Target.Row,
56)).Interior.ColorIndex = 33
ActiveSheet.Protect
End If
End If
End Sub
JB
On 15 nov, 11:30, IMER09 <t...@discussions.microso.com> wrote:
BONJOUR A TOUS
J'ai ce qui suit:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 56 And Target.Count = 1 And Target.Value = "OK" Then
ActiveSheet.Unprotect
Range(Cells(Target.Row, 1), Cells(Target.Row, 56)).Locked = True
Range(Cells(Target.Row, 1), Cells(Target.Row,
56)).Interior.ColorIndex = 33
ActiveSheet.Protect
End If
End Sub
Quand je selectionne une seul cells pas de pb
mais qd je fais une selection multiple
et que je veux par ex effacer le contenu : BUG
Je ne sais quoi faire
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 56 And Target.Count = 1 Then If Target.Value = "OK" Then ActiveSheet.Unprotect Range(Cells(Target.Row, 1), Cells(Target.Row, 56)).Locked True Range(Cells(Target.Row, 1), Cells(Target.Row, 56)).Interior.ColorIndex = 33 ActiveSheet.Protect End If End If End Sub
JB
On 15 nov, 11:30, IMER09 wrote:
BONJOUR A TOUS
J'ai ce qui suit: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 56 And Target.Count = 1 And Target.Value = "OK" Then ActiveSheet.Unprotect Range(Cells(Target.Row, 1), Cells(Target.Row, 56)).Locked = True Range(Cells(Target.Row, 1), Cells(Target.Row, 56)).Interior.ColorIndex = 33 ActiveSheet.Protect End If End Sub Quand je selectionne une seul cells pas de pb mais qd je fais une selection multiple et que je veux par ex effacer le contenu : BUG Je ne sais quoi faire
Merci
-- IMER09
IMER09
le nez au milieu de la ....
Merci JB -- IMER09
Bonjour,
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 56 And Target.Count = 1 Then If Target.Value = "OK" Then ActiveSheet.Unprotect Range(Cells(Target.Row, 1), Cells(Target.Row, 56)).Locked > True Range(Cells(Target.Row, 1), Cells(Target.Row, 56)).Interior.ColorIndex = 33 ActiveSheet.Protect End If End If End Sub
JB
On 15 nov, 11:30, IMER09 wrote:
BONJOUR A TOUS
J'ai ce qui suit: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 56 And Target.Count = 1 And Target.Value = "OK" Then ActiveSheet.Unprotect Range(Cells(Target.Row, 1), Cells(Target.Row, 56)).Locked = True Range(Cells(Target.Row, 1), Cells(Target.Row, 56)).Interior.ColorIndex = 33 ActiveSheet.Protect End If End Sub Quand je selectionne une seul cells pas de pb mais qd je fais une selection multiple et que je veux par ex effacer le contenu : BUG Je ne sais quoi faire
Merci
-- IMER09
le nez au milieu de la ....
Merci JB
--
IMER09
Bonjour,
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 56 And Target.Count = 1 Then
If Target.Value = "OK" Then
ActiveSheet.Unprotect
Range(Cells(Target.Row, 1), Cells(Target.Row, 56)).Locked > True
Range(Cells(Target.Row, 1), Cells(Target.Row,
56)).Interior.ColorIndex = 33
ActiveSheet.Protect
End If
End If
End Sub
JB
On 15 nov, 11:30, IMER09 <t...@discussions.microso.com> wrote:
BONJOUR A TOUS
J'ai ce qui suit:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 56 And Target.Count = 1 And Target.Value = "OK" Then
ActiveSheet.Unprotect
Range(Cells(Target.Row, 1), Cells(Target.Row, 56)).Locked = True
Range(Cells(Target.Row, 1), Cells(Target.Row,
56)).Interior.ColorIndex = 33
ActiveSheet.Protect
End If
End Sub
Quand je selectionne une seul cells pas de pb
mais qd je fais une selection multiple
et que je veux par ex effacer le contenu : BUG
Je ne sais quoi faire
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 56 And Target.Count = 1 Then If Target.Value = "OK" Then ActiveSheet.Unprotect Range(Cells(Target.Row, 1), Cells(Target.Row, 56)).Locked > True Range(Cells(Target.Row, 1), Cells(Target.Row, 56)).Interior.ColorIndex = 33 ActiveSheet.Protect End If End If End Sub
JB
On 15 nov, 11:30, IMER09 wrote:
BONJOUR A TOUS
J'ai ce qui suit: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 56 And Target.Count = 1 And Target.Value = "OK" Then ActiveSheet.Unprotect Range(Cells(Target.Row, 1), Cells(Target.Row, 56)).Locked = True Range(Cells(Target.Row, 1), Cells(Target.Row, 56)).Interior.ColorIndex = 33 ActiveSheet.Protect End If End Sub Quand je selectionne une seul cells pas de pb mais qd je fais une selection multiple et que je veux par ex effacer le contenu : BUG Je ne sais quoi faire