fomrula bar will not popup even though VB was done to show.

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!


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
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
In ThisWorkbook's code module;

Code:
Private Sub Workbook_Deactivate()
    'Place the needed code related with showing formula bar, here !
End Sub

Private Sub Workbook_Activate()
    'You may need some code here, also ! 
    'Such as, code related with removing the formula bar.
End Sub
 
Last edited:
Upvote 0
Tashakur Adirm! but the formula bar is still not showing, after closing the workbook with the VB, and opening a fresh new workbook.
please help, thanks a lot

Code:
Private Sub Workbook_activate()
Application.DisplayFullScreen = False
ActiveWindow.DisplayHeadings = False
Application.DisplayFormulaBar = False
ActiveWindow.DisplayGridlines = False
ActiveWindow.Zoom = 125
ActiveWindow.DisplayWorkbookTabs = False


Range("A1").Select
End Sub

Private Sub Workbook_Deactivate()

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
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,327
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top