Problème macro

Bonjour les amis du forum,

Me voici de retour. Dans le fichier joint j'ai anticipé le mois de Mai en faisant : Clic droit => déplacer ou copier Avril 2013 ce qui a donné Avril 2013 (2)

J'ai renommé Mai 2013 mai lorsque je clique sur Afficher Boutons (jaune) erreur macro. Apparemment ça me demande de renommer les N° de Rectangle dans Macro? C'est ça?

Ou c'es viscieux ou ENORME!

Si quelqu'un du forum passe par là!

D'avance merci

Bien cordialement

Abel

Bonjour

Remplaces ta macro "BoutonChange" par celle-ci

Les boutons à masquer coins supérieur gauche après la colonne J (10)

Sub BoutonChange()
Dim Sh As Shape
Dim Voir As Boolean

  With ActiveSheet.Shapes(Application.Caller).TextFrame.Characters
    ActiveSheet.Unprotect Password:=""
    If .Text = "Afficher Boutons" Then
      Voir = True
      .Text = "Masquer Boutons"
    Else
      Voir = False      ' Inutile car par défaut = False
      .Text = "Afficher Boutons"
    End If
  End With

  With ActiveSheet
    For Each Sh In .Shapes
      If Sh.TopLeftCell.Column > 10 Then
        Sh.Visible = Voir
      End If
    Next Sh

    .Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, _
                AllowSorting:=True, AllowFiltering:=True, AllowUsingPivotTables:=True, Password:=""
  End With
End Sub

Bonjour Banzai64,

Effectivement ça n'a rien a voir!

P....N je me suis bien fait C...R avec ces Numéros de rectangles!

Merci Banzai64

Bonne fin de soirée

Bien amicalement du 87

Abel

Rechercher des sujets similaires à "probleme macro"