
Welcome toExcel2007.Tips.Net
Excel2007 Tips
ExcelTips
Gardening Tips
Pet Tips
Specifying the Number of MRU Files
Seeing How Excel Evaluates Formulas
Highlighting a Cell if It Contains Specific Text
Creating a List of Worksheet Formulas
Rodolfo knows that he can configure Excel to allow editing in both the Formula bar and the cell itself, but he wants to configure it so that editing can be done only in the cell, not in the Formula bar.
There is no way to do this in Excel. The closest you can come is to make sure that cell editing is enabled (so that editing can be done in either the Formula bar or the cell) and then hiding the Formula bar. You can hide the Formula bar by these steps:
If you prefer, you can also programmatically turn off the Formula bar for a specific worksheet. You can do this by using the following two macros, which should be assigned to the code for the specific worksheet you want to affect. (You can display the proper code window by right-clicking the worksheet's tab and selecting View Code from the resulting Context menu.)
Private Sub Worksheet_Activate()
Application.DisplayFormulaBar = False
End Sub
Private Sub Worksheet_Deactivate()
Application.DisplayFormulaBar = True
End Sub
The first macro turns off the Formula bar when the worksheet is activated, and the second turns it back on when the worksheet is deactivated (when another worksheet is selected).