countryfan_nt
Well-known Member
- Joined
- May 19, 2004
- Messages
- 765
Hello friends, Hope all is well.
Both below codes work fine, but the second code is not taking effect, I want the formula bar to show up when a new workbook opens.
thank you very much in advance!
Both below codes work fine, but the second code is not taking effect, I want the formula bar to show up when a new workbook opens.
thank you very much in advance!
Code:
Private Sub Workbook_Open()
Application.DisplayFullScreen = False
ActiveWindow.DisplayHeadings = False
Application.DisplayFormulaBar = False
ActiveWindow.DisplayGridlines = False
ActiveWindow.Zoom = 130
ActiveWindow.DisplayWorkbookTabs = False
Range("A1").Select
End Sub
Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ActiveWindow.DisplayWorkbookTabs = True
Application.OnKey "{F1}", ""
ActiveWindow.DisplayHeadings = True
Application.DisplayFullScreen = True
ActiveWindow.Zoom = 100
ActiveWindow.DisplayGridlines = True
Application.DisplayFormulaBar = True
Range("A1").Select
End Sub