vba script help
Can anybody give me some vb script (or more importantly -
advise where to place it) to auto close the Formatting and Standard Toolbars when my Excel workbook is opened? thanks |
vba script help
Private Sub Workbook_BeforeClose(Cancel As Boolean) With Application .CommandBars("Formatting").Visible = True .CommandBars("Standard").Visible = True End With End Sub Private Sub Workbook_Open() With Application .CommandBars("Formatting").Visible = False .CommandBars("Standard").Visible = False End With End Sub 'This is workbook event code. 'To input this code, right click on the Excel icon on the worksheet '(or next to the File menu if you maximise your workbooks), 'select View Code from the menu, and paste the code -- HTH Bob Phillips "anthony" wrote in message ... Can anybody give me some vb script (or more importantly - advise where to place it) to auto close the Formatting and Standard Toolbars when my Excel workbook is opened? thanks |
vba script help
Thanks Bob for the script and advising where to put it !!
Cheers Anthony "Bob Phillips" wrote: Private Sub Workbook_BeforeClose(Cancel As Boolean) With Application .CommandBars("Formatting").Visible = True .CommandBars("Standard").Visible = True End With End Sub Private Sub Workbook_Open() With Application .CommandBars("Formatting").Visible = False .CommandBars("Standard").Visible = False End With End Sub 'This is workbook event code. 'To input this code, right click on the Excel icon on the worksheet '(or next to the File menu if you maximise your workbooks), 'select View Code from the menu, and paste the code -- HTH Bob Phillips "anthony" wrote in message ... Can anybody give me some vb script (or more importantly - advise where to place it) to auto close the Formatting and Standard Toolbars when my Excel workbook is opened? thanks |
All times are GMT +1. The time now is 10:35 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com