Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 210
Default Hide all toolbars/menu bar when open file

Hi,

Hope someone can help me out here.

I would like to have all my toolbars/menubar go hidden when open the file
(say, newfile.xls); and then when restate all the toolbars/ menubar when i
close the file (by creating a macro button to perform such task).

Thanks

Robin

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Hide all toolbars/menu bar when open file

Hi Robin

You could do it using the code below.

Option Explicit
'you could also put the button event in the beforeclose event of the
workbook module to save you having to remember to do it.

Private Sub CommandButton1_Click()
Application.DisplayFullScreen = False
Application.CommandBars("Worksheet Menu Bar").Enabled = True
End Sub

Private Sub Workbook_Open()
Application.DisplayFullScreen = True
Application.CommandBars("Worksheet Menu Bar").Enabled = False
End Sub


hope it helps

S

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Hide all toolbars/menu bar when open file

Put this in the ThisWorkbook code module and try it.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.DisplayFullScreen = False
End Sub

Private Sub Workbook_Open()
Application.DisplayFullScreen = True
End Sub

Mike F
"Robin" wrote in message
...
Hi,

Hope someone can help me out here.

I would like to have all my toolbars/menubar go hidden when open the file
(say, newfile.xls); and then when restate all the toolbars/ menubar when i
close the file (by creating a macro button to perform such task).

Thanks

Robin



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 210
Default Hide all toolbars/menu bar when open file

Hi Incidental,

Thanks for your reply.

I was wondering whether without using a button, the macro works when i open
the file. I do not want my user to consciously hide away the
toolbars/menubar.

Hope you can teach me how as I dont really know how to do that ...

As for restating back the toolbars when they try to quit my file, i can use
the button macro programming.

Thanks in advance!

Robin

"Incidental" wrote:

Hi Robin

You could do it using the code below.

Option Explicit
'you could also put the button event in the beforeclose event of the
workbook module to save you having to remember to do it.

Private Sub CommandButton1_Click()
Application.DisplayFullScreen = False
Application.CommandBars("Worksheet Menu Bar").Enabled = True
End Sub

Private Sub Workbook_Open()
Application.DisplayFullScreen = True
Application.CommandBars("Worksheet Menu Bar").Enabled = False
End Sub


hope it helps

S


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 210
Default Hide all toolbars/menu bar when open file

Hi All,

I have combined Mike's suggestion solution and Incidental's ... seem to be
working towards my goal.

But there is the fullscreen toolbar appearing on my worksheet, at the press
of the button all the toolbars showed up. Is there a way not to let the
Fullscreen toolbar shows up on my screen?

Thanks everyone!

Robin



"Mike Fogleman" wrote:

Put this in the ThisWorkbook code module and try it.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.DisplayFullScreen = False
End Sub

Private Sub Workbook_Open()
Application.DisplayFullScreen = True
End Sub

Mike F
"Robin" wrote in message
...
Hi,

Hope someone can help me out here.

I would like to have all my toolbars/menubar go hidden when open the file
(say, newfile.xls); and then when restate all the toolbars/ menubar when i
close the file (by creating a macro button to perform such task).

Thanks

Robin






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Hide all toolbars/menu bar when open file

Hi Robin

if you put the following code in the "Thisworkbook" module it will
automatically change when you open the file

Option Explicit

Private Sub Workbook_Open()
Application.DisplayFullScreen = True
Application.CommandBars("Worksheet Menu Bar").Enabled = False
End Sub

S

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 210
Default Hide all toolbars/menu bar when open file

Hi S,

Thanks for the solution. Exactly what i was looking for. One small thing - I
wish the fullscreen toolbar does not show up on the screen for my user(s) to
click on it. I would like them to use the spreadsheet without coming out from
the fullscreen.

Thanks

Robin



"Incidental" wrote:

Hi Robin

if you put the following code in the "Thisworkbook" module it will
automatically change when you open the file

Option Explicit

Private Sub Workbook_Open()
Application.DisplayFullScreen = True
Application.CommandBars("Worksheet Menu Bar").Enabled = False
End Sub

S


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Hide all toolbars/menu bar when open file

Hi Robin

Sorry for the late reply, you could use

Application.CommandBars("Full Screen").Visible = False

hope this helps you out

S


  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 210
Default Hide all toolbars/menu bar when open file

Hi S,

The last command works well!

Thank you so much.

Robin



"Incidental" wrote:

Hi Robin

Sorry for the late reply, you could use

Application.CommandBars("Full Screen").Visible = False

hope this helps you out

S



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 Print option from File Menu Harish Excel Programming 4 June 22nd 06 08:45 PM
File Not Found menu pops up after I open a file Harveytunes Excel Discussion (Misc queries) 3 January 27th 06 07:23 PM
hide toolbars, menu bar, etc runandrun Excel Discussion (Misc queries) 0 September 22nd 05 10:16 PM
Hide And Un-hide Excel Toolbars Jim333[_4_] Excel Programming 3 July 2nd 05 08:00 PM
How to automaticaly hide all toolbars in in workbook when another workbooks are open? Igor Sudnik Excel Programming 1 August 18th 04 09:05 PM


All times are GMT +1. The time now is 12:52 AM.

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"