VBA – Turn Formula Bar Off (or On)
In this Article
When creating an Excel template you may want to turn off the formula bar to limit unwanted user actions.
Alternatively, if you are using a spreadsheet and the formula bar is missing you may want to turn it back on.
Turn Formula Bar On or Off From Excel
To toggle the formula bar On or Off:
On the Ribbon:
1. Click View
2. Check or Uncheck “Formula Bar” in the Show section
or you can use keyboard shortcuts: Alt > W > V > F
Turn Formula Bar On or Off with VBA
To do this from VBA:
Macro to turn off the formula bar
Application.DisplayFormulaBar = False
Macro to turn on the formula bar
Application.DisplayFormulaBar = True
Expand or Collapse Formula Bar
You can also resize the Formula Bar by clicking and dragging at the bottom of the formula bar or by using this shortcut: CTRL + SHIFT + U (MAC: ^ + Shift + U).
VBA Coding Made Easy
Stop searching for VBA code online. Learn more about AutoMacro – A VBA Code Builder that allows beginners to code procedures from scratch with minimal coding knowledge and with many time-saving features for all users!
Did you find this VBA tutorial useful? Then share it with your friends and colleagues: