Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Hide all menubars even 'Worksheet Menu Bar'

Dear All,

How can I hide all menubars by code when opening excel from Access.

Thanks,

Filip


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Hide all menubars even 'Worksheet Menu Bar'

Hi Filips

Try this in Access

Sub test()
Dim bar
On Error Resume Next
Set xl = GetObject(, "Excel.Application")
If xl Is Nothing Then
Set xl = GetObject("", "Excel.Application")
xl.workbooks.Open "c:\Data\test3.xls"
xl.UserControl = True
xl.Visible = True
For Each bar In xl.CommandBars
bar.Enabled = False
Next
End If
AppActivate "Microsoft Excel"
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Filips Benoit" wrote in message ...
Dear All,

How can I hide all menubars by code when opening excel from Access.

Thanks,

Filip




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Hide all menubars even 'Worksheet Menu Bar'

Dim ocb As Object

For Each ocb In xlApp.CommandBars
If ocb.Name < "Worksheet Menu Bar" And _
ocb.Visible Then _
ocb.Visible = False
Next ocb
Application.CommandBars("Worksheet Menu Bar").Enabled = False


--

HTH

RP

"Filips Benoit" wrote in message
...
Dear All,

How can I hide all menubars by code when opening excel from Access.

Thanks,

Filip




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Hide all menubars even 'Worksheet Menu Bar'

Thanks but:


The user that opens excel from the access-interface must not have the
menubar, that works OK.
But other users who opens excel directly on the server must have the
menubar.
Now the MenuBar stays NOT enabled.

How do i enable the 'Worksheet Menu Bar' on closing excel.

Filip

"Bob Phillips" wrote in message
...
Dim ocb As Object

For Each ocb In xlApp.CommandBars
If ocb.Name < "Worksheet Menu Bar" And _
ocb.Visible Then _
ocb.Visible = False
Next ocb
Application.CommandBars("Worksheet Menu Bar").Enabled = False


--

HTH

RP

"Filips Benoit" wrote in message
...
Dear All,

How can I hide all menubars by code when opening excel from Access.

Thanks,

Filip






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Hide all menubars even 'Worksheet Menu Bar'

I would have thought that was obvious

Application.CommandBars("Worksheet Menu Bar").Enabled = True

--

HTH

RP

"Filips Benoit" wrote in message
...
Thanks but:


The user that opens excel from the access-interface must not have the
menubar, that works OK.
But other users who opens excel directly on the server must have the
menubar.
Now the MenuBar stays NOT enabled.

How do i enable the 'Worksheet Menu Bar' on closing excel.

Filip

"Bob Phillips" wrote in message
...
Dim ocb As Object

For Each ocb In xlApp.CommandBars
If ocb.Name < "Worksheet Menu Bar" And _
ocb.Visible Then _
ocb.Visible = False
Next ocb
Application.CommandBars("Worksheet Menu Bar").Enabled = False


--

HTH

RP

"Filips Benoit" wrote in message
...
Dear All,

How can I hide all menubars by code when opening excel from Access.

Thanks,

Filip










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 the menubars and toolbars Pietro Excel Discussion (Misc queries) 11 April 11th 08 02:45 PM
How do I hide the Worksheet menu bar Chris Excel Worksheet Functions 1 May 20th 06 11:14 AM
identify 'save as' of the commandbar 'worksheet menu bar' Manfred Excel Programming 2 August 31st 04 01:34 PM
Hide all menubars Jonsson[_6_] Excel Programming 2 January 30th 04 01:26 PM
Make "Worksheet Menu Bar" invisible or Delete/hide it's buttons Bob Phillips[_5_] Excel Programming 0 August 11th 03 01:05 PM


All times are GMT +1. The time now is 03:16 AM.

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

About Us

"It's about Microsoft Excel"