Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel 2003: Customizing Toolbars


Hello, I have a wb with built in commandbars and toolbars customized on
the activate wb event and resetted on the deactivate wb event. I'ld like
to know if it is possible to prevent the user to disable the macro at
the start of the wb and to customize the menus/toolbars. Moreover I can
disable a commandbar (for example "Tools") getting it grayed on the
worksheet menubar, but I'm not able to hide it completely.

I have used this

Application.CommandBars("Tools").enabled=False

and these

Application.CommandBars("Tools").enabled=False
Application.CommandBars("Tools").visible=False

but with these I'm able to hide only the toolbars (e.g. Standard tb).

Emiliano


--
eggpap

Excel 2003 on Vista HP System - can use VBA
------------------------------------------------------------------------
eggpap's Profile: http://www.thecodecage.com/forumz/member.php?userid=90
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=13064

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Excel 2003: Customizing Toolbars

hi Emiliano, try

Application.Commandbars(1).Controls("Tools").Enabl ed =False

CommandBars(1) is also Commandbars("Worksheet Menu Bar")

stefan

On 20 Jan., 15:47, eggpap wrote:
Hello, I have a wb with built in commandbars and toolbars customized on
the activate wb event and resetted on the deactivate wb event. I'ld like
to know if it is possible to prevent the user to disable the macro at
the start of the wb and to customize the menus/toolbars. Moreover I can
disable a commandbar (for example "Tools") getting it grayed on the
worksheet menubar, but I'm not able to hide it completely.

I have used this

Application.CommandBars("Tools").enabled=False

and these

Application.CommandBars("Tools").enabled=False
Application.CommandBars("Tools").visible=False

but with these I'm able to hide only the toolbars (e.g. Standard tb).

Emiliano

--
eggpap

Excel 2003 on Vista HP System - can use VBA
------------------------------------------------------------------------
eggpap's Profile:http://www.thecodecage.com/forumz/member.php?userid=90
View this thread:http://www.thecodecage.com/forumz/sh...ad.php?t=13064


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel 2003: Customizing Toolbars


thanks Stefan.

I have the following code modified according to your tip

'to hide the Standard and Formatting tb correctly performing
Application.CommandBars("Standard").Enabled = False
Application.CommandBars("Standard").Visible = False
Application.CommandBars("Formatting").Enabled = False
Application.CommandBars("Formatting").Visible = False

'To hide the CommandBar Help - *I get error 5*

Application.CommandBars(1).Controls("Help").Enable d = False

Any other tip?
Emiliano


--
eggpap

Excel 2003 on Vista HP System - can use VBA
------------------------------------------------------------------------
eggpap's Profile: http://www.thecodecage.com/forumz/member.php?userid=90
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=13064

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Excel 2003: Customizing Toolbars

hi Emiliano,
do you have a Control with the Caption "Help" or do you mean the
"?" (which is the caption for the help in german excel, i`m not sure
if it´s the same in english)
try Application.CommandBars(1).Controls("?").Enabled = False

stefan

'To hide the CommandBar Help - *I get error 5*

Application.CommandBars(1).Controls("Help").Enable d = False

Any other tip?
Emiliano

--

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel 2003: Customizing Toolbars


Dear Stefan,

I'm an Italian user. The Help control is only one of the controls I
need to hide. I get the same error with other controls. My first try was
supposing the controls captions was the same I see on the Worksheet Menu
Bar but I got "good" results only using the english caption.

Emiliano


--
eggpap

Excel 2003 on Vista HP System - can use VBA
------------------------------------------------------------------------
eggpap's Profile: http://www.thecodecage.com/forumz/member.php?userid=90
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=13064



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Excel 2003: Customizing Toolbars

hi Emiliano,
hmm, do you mean the Help right of the Worksheet Menu Bar, where you
can type your question?
This will be disabled with
Application.CommandBars.DisableAskAQuestionDropdow n = True

to disable all Commandbars, you can use

For Each cb in Application.CommandBars
cb.Enabled =False
Next

and with the same just True instead of False the visible CommandBars
will be restored.

stefan

On 20 Jan., 20:13, eggpap wrote:
Dear Stefan,

I'm an Italian user. The Help control is only one of the controls I
need to hide. I get the same error with other controls. My first try was
supposing the controls captions was the same I see on the Worksheet Menu
Bar but I got "good" results only using the english caption.

Emiliano

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
Excel 2003: Customizing Toolbars brendotroy Excel Discussion (Misc queries) 2 September 18th 08 01:47 PM
Custom toolbars in Excel 2003 jillc Excel Programming 6 August 24th 07 09:28 AM
Toolbars in Excel 2003 Adam Excel Discussion (Misc queries) 3 November 3rd 05 02:54 PM
Customizing ToolBars MIKE MEDLIN Excel Discussion (Misc queries) 0 January 13th 05 12:11 AM


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