Private Sub Workbook_Open()
With Windows(ThisWorkbook.Name)
.Application.CommandBars("Ply").enabled = False 'Masquage menu contextuel
.Application.DisplayFormulaBar = False 'Masquage barre de formule
.Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",false)" 'Masquage ruban
End With
End Sub
Private Sub ToutVisible()
With Windows(ThisWorkbook.Name)
.Application.CommandBars("Ply").enabled = True 'Menu contextuel visible
.Application.DisplayFormulaBar = True 'Barre de formule visible
.Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",true)" 'Ruban visible
End With
End Sub
MERCI BEAUCOUP!!!Bonjour KTM,
Un essai en PJ avec :
Et pour tout remettre dans l'ordre :VB:Private Sub Workbook_Open() With Windows(ThisWorkbook.Name) .Application.CommandBars("Ply").enabled = False 'Masquage menu contextuel .Application.DisplayFormulaBar = False 'Masquage barre de formule .Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",false)" 'Masquage ruban End With End Sub
Code:Private Sub ToutVisible() With Windows(ThisWorkbook.Name) .Application.CommandBars("Ply").enabled = True 'Menu contextuel visible .Application.DisplayFormulaBar = True 'Barre de formule visible .Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",true)" 'Ruban visible End With End Sub