Bonjour,
je vous post mon problème. la macro ci-dessous fonction sans problème sauf quand la feuille excel est en protection et ce malgré que la cellule "K24" ne soit pas verroulliée.
Je ne suis pas très doué car j'ai arrangé cette macro trouvée ici à ma sauce. Soyez indulgent...
Que faut-il que je fasse?
Merci pour votre intervention.
Lego
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim n As Byte
Dim Start As Variant
Dim i As Integer
If [K24] = "GPB" Then
Const Texte As String = ""
For i = 1 To 4
Cells(24, 11).Font.ColorIndex = 6
Cells(24, 11).Interior.ColorIndex = 3
For n = 1 To 10
Start = Timer
Do While Timer < Start + 1 / 100
Loop
If n Mod 5 = 0 Then
Cells(24, 11).Interior.ColorIndex = xlNone
Cells(24, 11).Font.ColorIndex = 1
End If
Next n
Next i
End If
Exit Sub
End Sub
je vous post mon problème. la macro ci-dessous fonction sans problème sauf quand la feuille excel est en protection et ce malgré que la cellule "K24" ne soit pas verroulliée.
Je ne suis pas très doué car j'ai arrangé cette macro trouvée ici à ma sauce. Soyez indulgent...
Que faut-il que je fasse?
Merci pour votre intervention.
Lego
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim n As Byte
Dim Start As Variant
Dim i As Integer
If [K24] = "GPB" Then
Const Texte As String = ""
For i = 1 To 4
Cells(24, 11).Font.ColorIndex = 6
Cells(24, 11).Interior.ColorIndex = 3
For n = 1 To 10
Start = Timer
Do While Timer < Start + 1 / 100
Loop
If n Mod 5 = 0 Then
Cells(24, 11).Interior.ColorIndex = xlNone
Cells(24, 11).Font.ColorIndex = 1
End If
Next n
Next i
End If
Exit Sub
End Sub