Antes el código estaba así:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.DisplayStatusBar = True
Application.DisplayCommentIndicator = 0
Application.CommandBars("Formatting").Visible = True
Application.CommandBars("Standard").Visible = True
Application.CommandBars("Web").Visible = True
Application.DisplayFormulaBar = True
End Sub
Private Sub Workbook_Open()
Application.DisplayStatusBar = False
Application.DisplayCommentIndicator = 0
Application.CommandBars("Formatting").Visible = False
Application.CommandBars("Standard").Visible = False
Application.CommandBars("Web").Visible = False
Application.DisplayFormulaBar = False
End Sub
Ahora, quedo así:
Sub ejemplo()
ExecuteExcel4Macro ("show.toolbar(""ribbon"",0)")
End Sub
Private Sub Workbook_Open()
Application.DisplayStatusBar = False
Application.DisplayCommentIndicator = 0
Application.CommandBars("Formatting").Visible = False
Application.CommandBars("Standard").Visible = False
Application.CommandBars("Web").Visible = False
Application.DisplayFormulaBar = False
End Sub
¿Puedes reformar por favor, todo este código, tal cual debería quedar?...
Muchas gracias.