Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 99
Default Hide ribbon+command bars in 2003/2007 for specific file

I am developing a workbook for users that will be using excel 2003 and 2007.
I found code that will hide the ribbon and all command bars in both 2003 and
2007. Forgive the ignorance, but it seems to be happen to even new workbooks.
I only want to hide everything for my specific file and for no others. How do
I modify my code so that it only happens in my workbook and not in others
that are open at the same time. I thought by putting the code in
"ThisWorkbook" under the file it would only affect that specific file. Here
is my current code:

Private Sub Workbook_Open()
Application.DisplayFormulaBar = False
ActiveWindow.DisplayHeadings = False
Application.DisplayFullScreen = True
Application.DisplayStatusBar = False
End Sub

Private Sub Disable_Command_Bars_1()
'This will disable all Command bars
Dim Cbar As CommandBar
For Each Cbar In Application.CommandBars
Cbar.Enabled = False
Next
End Sub

(My goal is to hide all toolbars and ribbons, status bars, formula bars and
right-clicking etc whether in 2003 or 07 so that it looks like a form it it's
own window. I still want excel to work normally outside this file)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 434
Default Hide ribbon+command bars in 2003/2007 for specific file

hi, !

ir you already have under control what to do (as mentioned in your post)...
try moving your "disabling" code in ThisWorkbook code-module to event: Workbook_WindowActivate
and the reverse actions (true to false and false to true) to the event: Workbook_WindowDeactivate

hth,
hector.

__ OP __
I am developing a workbook for users that will be using excel 2003 and 2007.
I found code that will hide the ribbon and all command bars in both 2003 and 2007.
Forgive the ignorance, but it seems to be happen to even new workbooks.
I only want to hide everything for my specific file and for no others.
How do I modify my code so that it only happens in my workbook
and not in others that are open at the same time.
I thought by putting the code in "ThisWorkbook" under the file it would only affect that specific file.
Here is my current code:

Private Sub Workbook_Open()
Application.DisplayFormulaBar = False
ActiveWindow.DisplayHeadings = False
Application.DisplayFullScreen = True
Application.DisplayStatusBar = False
End Sub

Private Sub Disable_Command_Bars_1()
'This will disable all Command bars
Dim Cbar As CommandBar
For Each Cbar In Application.CommandBars
Cbar.Enabled = False
Next
End Sub

(My goal is to hide all toolbars and ribbons, status bars, formula bars and right-clicking etc whether in 2003 or 07
so that it looks like a form it it's own window. I still want excel to work normally outside this file)



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Hide ribbon+command bars in 2003/2007 for specific file

And if you hide the Ribbon in 2007 with RibbonX it will automatic work only for that workbook

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"Héctor Miguel" wrote in message ...
hi, !

ir you already have under control what to do (as mentioned in your post)...
try moving your "disabling" code in ThisWorkbook code-module to event: Workbook_WindowActivate
and the reverse actions (true to false and false to true) to the event: Workbook_WindowDeactivate

hth,
hector.

__ OP __
I am developing a workbook for users that will be using excel 2003 and 2007.
I found code that will hide the ribbon and all command bars in both 2003 and 2007.
Forgive the ignorance, but it seems to be happen to even new workbooks.
I only want to hide everything for my specific file and for no others.
How do I modify my code so that it only happens in my workbook
and not in others that are open at the same time.
I thought by putting the code in "ThisWorkbook" under the file it would only affect that specific file.
Here is my current code:

Private Sub Workbook_Open()
Application.DisplayFormulaBar = False
ActiveWindow.DisplayHeadings = False
Application.DisplayFullScreen = True
Application.DisplayStatusBar = False
End Sub

Private Sub Disable_Command_Bars_1()
'This will disable all Command bars
Dim Cbar As CommandBar
For Each Cbar In Application.CommandBars
Cbar.Enabled = False
Next
End Sub

(My goal is to hide all toolbars and ribbons, status bars, formula bars and right-clicking etc whether in 2003 or 07
so that it looks like a form it it's own window. I still want excel to work normally outside this file)




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 99
Default Hide ribbon+command bars in 2003/2007 for specific file

Works perfectly! Thank you!

"Héctor Miguel" wrote:

hi, !

ir you already have under control what to do (as mentioned in your post)...
try moving your "disabling" code in ThisWorkbook code-module to event: Workbook_WindowActivate
and the reverse actions (true to false and false to true) to the event: Workbook_WindowDeactivate

hth,
hector.

__ OP __
I am developing a workbook for users that will be using excel 2003 and 2007.
I found code that will hide the ribbon and all command bars in both 2003 and 2007.
Forgive the ignorance, but it seems to be happen to even new workbooks.
I only want to hide everything for my specific file and for no others.
How do I modify my code so that it only happens in my workbook
and not in others that are open at the same time.
I thought by putting the code in "ThisWorkbook" under the file it would only affect that specific file.
Here is my current code:

Private Sub Workbook_Open()
Application.DisplayFormulaBar = False
ActiveWindow.DisplayHeadings = False
Application.DisplayFullScreen = True
Application.DisplayStatusBar = False
End Sub

Private Sub Disable_Command_Bars_1()
'This will disable all Command bars
Dim Cbar As CommandBar
For Each Cbar In Application.CommandBars
Cbar.Enabled = False
Next
End Sub

(My goal is to hide all toolbars and ribbons, status bars, formula bars and right-clicking etc whether in 2003 or 07
so that it looks like a form it it's own window. I still want excel to work normally outside this file)




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
Hide Excel Ribbon 2007 amit Excel Programming 10 April 14th 08 12:46 PM
how do I hide scroll bars on specific sheets within a workbook AzMan Excel Discussion (Misc queries) 2 October 29th 07 12:36 PM
Excel 2003 Command bars [email protected] Excel Programming 4 February 16th 07 04:15 PM
Hide ribbon or menu bar in Excel 2007 Jim Rech Excel Programming 3 January 18th 07 07:59 PM
Hide all Excel tool/command bars except mine and reload on close Matt Jensen Excel Programming 2 December 20th 04 05:44 PM


All times are GMT +1. The time now is 02:25 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"