Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 275
Default 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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I need some VB script please rlee1999 Excel Discussion (Misc queries) 2 October 25th 06 05:46 PM
VB Script Krista Excel Worksheet Functions 4 May 20th 06 03:12 PM
Help with VB script please? Peter[_28_] Excel Programming 5 October 13th 04 11:49 PM
Excel 2000/XP script to Excel97 script hat Excel Programming 3 March 2nd 04 03:56 PM
Script? Scrappy[_2_] Excel Programming 1 July 21st 03 08:44 PM


All times are GMT +1. The time now is 03:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"