Bonjour le Forum,
j'ai un problème avec cette macro, elles me bloque lorsque j'active la feuille ou que je souhaite sauvegarder le classeur, quelqu'un pourrait il me venir en aide, un grand merci
Private Sub Worksheet_Activate()
Application.ScreenUpdating = False
Worksheets("Bilan").Unprotect ("SC6")
Range("A1:W5").Select
ActiveWindow.Zoom = True
ScrollArea = "A1:W35"
If [J78].Value = "A" Then
Range("K82") = "A"
ActiveSheet.Shapes("Rectangle : coins arrondis 34").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 35").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 36").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 37").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 38").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 46").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 32").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 39").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 40").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 41").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 42").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 45").Visible = False
Else
Range("K82") = "D"
ActiveSheet.Shapes("Rectangle : coins arrondis 34").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 35").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 36").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 37").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 38").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 46").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 32").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 39").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 40").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 41").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 42").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 45").Visible = True
End If
Range("A1").Select
Worksheets("Bilan").Protect ("SC6")
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If [K82].Value = "A" Then
ActiveSheet.Shapes("Rectangle : coins arrondis 34").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 35").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 36").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 37").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 38").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 46").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 32").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 39").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 40").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 41").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 42").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 45").Visible = False
Else
Range("K82") = "D"
ActiveSheet.Shapes("Rectangle : coins arrondis 34").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 35").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 36").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 37").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 38").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 46").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 32").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 39").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 40").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 41").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 42").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 45").Visible = True
End If
un grand merci et une belle journée amis excelliens
j'ai un problème avec cette macro, elles me bloque lorsque j'active la feuille ou que je souhaite sauvegarder le classeur, quelqu'un pourrait il me venir en aide, un grand merci
Private Sub Worksheet_Activate()
Application.ScreenUpdating = False
Worksheets("Bilan").Unprotect ("SC6")
Range("A1:W5").Select
ActiveWindow.Zoom = True
ScrollArea = "A1:W35"
If [J78].Value = "A" Then
Range("K82") = "A"
ActiveSheet.Shapes("Rectangle : coins arrondis 34").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 35").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 36").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 37").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 38").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 46").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 32").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 39").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 40").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 41").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 42").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 45").Visible = False
Else
Range("K82") = "D"
ActiveSheet.Shapes("Rectangle : coins arrondis 34").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 35").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 36").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 37").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 38").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 46").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 32").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 39").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 40").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 41").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 42").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 45").Visible = True
End If
Range("A1").Select
Worksheets("Bilan").Protect ("SC6")
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If [K82].Value = "A" Then
ActiveSheet.Shapes("Rectangle : coins arrondis 34").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 35").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 36").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 37").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 38").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 46").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 32").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 39").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 40").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 41").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 42").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 45").Visible = False
Else
Range("K82") = "D"
ActiveSheet.Shapes("Rectangle : coins arrondis 34").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 35").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 36").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 37").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 38").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 46").Visible = False
ActiveSheet.Shapes("Rectangle : coins arrondis 32").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 39").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 40").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 41").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 42").Visible = True
ActiveSheet.Shapes("Rectangle : coins arrondis 45").Visible = True
End If
un grand merci et une belle journée amis excelliens
Dernière édition: