Forum Discussion

Lorenzo Kim's avatar
Lorenzo Kim
Bronze Contributor
Jun 05, 2018

For Excel 2013 - the right vba code to hide ribbon as per image

I have tried several codes to minimize the ribbon on top but sometimes it just appear when file is opened. I settled with the code below ( whew! I am so NOOB..)

 

Private Sub Workbook_Open()

If Application.CommandBars("Ribbon").Height >= 100 Then  '(is 100 the correct number?)
SendKeys "^{F1}"
End If
Application.CommandBars("ply").Enabled = False
Application.DisplayFormulaBar = False

End Sub

 

is the code above correct?

Image below is the desired window for the project..

many thanks

 

 

 

 

 

No RepliesBe the first to reply

Resources