I am trying to hide my ribbons upon my workfile opening.
I've followed the below link but keep getting run-time error 91. VBA auto hide ribbon in Excel 2013
I've written the following code on the "thisworkbook" mode, but cannot get the line to work.
Private Sub Workbook_Open()
CommandBars.ExecuteMso "HideRibbon"
End Sub
You need to add Application in front of CommandBars.
Private Sub Workbook_Open()
application.CommandBars.ExecuteMso "HideRibbon"
End Sub
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With