Hiding the formula bar in Excel for a specific file

Short answer is: No, you cannot.

Unfortunately, you cannot hide it by editing the CustomUI file. The formula bar has to be hidden using VBA. That being said, you can just run the hide operation on the Workbook_open event.

Private Sub Workbook_Open() 
    Application.DisplayFormulaBar = False 
End Sub 

You can turn it on/off depending on the active sheet like so:

Private Sub Workbook_SheetActivate(ByVal Sh As Object)

If Sh.Name = "Sheet1" Then
    Application.DisplayFormulaBar = False
Else
    Application.DisplayFormulaBar = True
End If

End Sub

Tags:

Excel