Magic_Doctor XLDnaute Barbatruc 17 Octobre 2020 #1 Bonjour, Sur la feuille il y a un CommandButton intitulé "CommandButton2". À partir d'un USF, je voudrais l'occulter. Je m'y suis pris ainsi, mais sans succès : VB: Worksheet.OLEObjects("CommandButton2").Object.Visible = False Comment s'y prendre ?
Bonjour, Sur la feuille il y a un CommandButton intitulé "CommandButton2". À partir d'un USF, je voudrais l'occulter. Je m'y suis pris ainsi, mais sans succès : VB: Worksheet.OLEObjects("CommandButton2").Object.Visible = False Comment s'y prendre ?
patricktoulon XLDnaute Barbatruc 17 Octobre 2020 #2 re bonsoir @Magic_Doctor le parent!!!!!!! sheets("xxxxx").OLEObjects("CommandButton2").Object.Visible = False ou tout simplement Sheets("xxxx").Shapes("CommandButton1").Visible = False Vote positif 0 Vote négatif
re bonsoir @Magic_Doctor le parent!!!!!!! sheets("xxxxx").OLEObjects("CommandButton2").Object.Visible = False ou tout simplement Sheets("xxxx").Shapes("CommandButton1").Visible = False
Magic_Doctor XLDnaute Barbatruc 19 Octobre 2020 #3 Bonjour patricktoulon, Pas pu répondre avant. En effet, j'avais omis le parent. C'est assez curieux, car j'ai essayé ceci : VB: Sheets("Hoja1").Shapes("CommandButton2").Visible = False Ça n'a pas marché. Puis, j'ai essayé ceci : VB: Sheets("Hoja1").OLEObjects("CommandButton2").Object.Visible = False Ça n'a toujours pas marché. Enfin, j'ai essayé ceci : VB: Worksheets("Hoja1").CommandButton2.Visible = False Et là ça marche. Vote positif 0 Vote négatif
Bonjour patricktoulon, Pas pu répondre avant. En effet, j'avais omis le parent. C'est assez curieux, car j'ai essayé ceci : VB: Sheets("Hoja1").Shapes("CommandButton2").Visible = False Ça n'a pas marché. Puis, j'ai essayé ceci : VB: Sheets("Hoja1").OLEObjects("CommandButton2").Object.Visible = False Ça n'a toujours pas marché. Enfin, j'ai essayé ceci : VB: Worksheets("Hoja1").CommandButton2.Visible = False Et là ça marche.
job75 XLDnaute Barbatruc 19 Octobre 2020 #4 Bonsoir Magic_Doctor, patricktoulon, Chez moi sur Excel 2019 ceci fonctionne : VB: Sheets("Hoja1").OLEObjects("CommandButton2").Visible = False Mais ceci beugue : Code: Sheets("Hoja1").OLEObjects("CommandButton2").Object.Visible = False A+ Vote positif 0 Vote négatif
Bonsoir Magic_Doctor, patricktoulon, Chez moi sur Excel 2019 ceci fonctionne : VB: Sheets("Hoja1").OLEObjects("CommandButton2").Visible = False Mais ceci beugue : Code: Sheets("Hoja1").OLEObjects("CommandButton2").Object.Visible = False A+
Magic_Doctor XLDnaute Barbatruc 19 Octobre 2020 #5 Bonsoir job, C'est sans doute parce que je suis sur Excel 2007. Vote positif 0 Vote négatif