0

I have been trying to hide a ribbon automatically when opening the workbook with this code

Private Sub Workbook_Open()

    Application.CommandBars.ExecuteMso "HideRibbon"

End Sub

It is not working as on-event open workbook but it is working when i press F5, any advice? '

Tim Williams
  • 154,628
  • 8
  • 97
  • 125
nixa011
  • 1
  • 1
  • Try adding `AppActivate Title:=ThisWorkbook.Application.Caption` before your 'HideRibbon' command – MBB70 Feb 26 '19 at 22:16
  • Please see the comments to this answer: https://stackoverflow.com/a/39310260/10908769 – Asger Feb 27 '19 at 10:02

0 Answers0