PC Review


Reply
Thread Tools Rate Thread

Command Bars - working with the built in buttons

 
 
=?Utf-8?B?dmVyeWVhdnk=?=
Guest
Posts: n/a
 
      17th Sep 2007
Hi all,

One quick specific question re one wee oddity I have noted with the
following line of code:

Dim btnLB3 As CommandBarButton
Set btnLB3 =
Application.CommandBars("SLBTbar").Controls.Add(Type:=msoControlButton,
ID:=1561)

which adds the "View Code" button to my custom toolbar "SLBTbar".

However once added it is disabled when I try to use it from the workbook I
created it from, but it works fine when other workbooks are activated.

Sure this is easy peasy and I am just being stoopid.


I have a general question surrounding this whole area - we have a problem at
work which we have been told is due to a key add-in not being able to cope
with an excel11.xlb file bigger than 30KB. Obviously this severely limits the
amount of customisation we can do to our toolbars. Equally obviously our IT
bods are cretins. I am not an IT bod <grin>.

I have seen the Debra Dalgleish approach using an add-in to creating custom
toolbars on the fly and also the John Walkenbach approach to saving and
retrieving menu settings to a worksheet, and realise it would not be rocket
science to create a "save and retrieve" functionality for the whole
menu/toolbar structure outside of the xlb file.

There are obviously a number of questions:

1. Is it likely IT Dept talking sense with respect to a large add-in falling
over if the xlb file is too big? (i.e we can have an extensively customised
menu or the functionality of the add-in but not both).
2. If so has anyone already designed a fully fledged workaround to save all
a users menu/toolbar settings outside of the xlb file.
3. Any general pointers (obviously I am just messing around learning how
this stuff works at the moment)

Cheers,



 
Reply With Quote
 
 
 
 
Jim Rech
Guest
Posts: n/a
 
      17th Sep 2007
>>However once added it is disabled

I wasn't able to duplicate this. Unless of course the active sheet was a
chart sheet or an XL4 macro sheet or a dialog sheet...

>>we have been told is due to a key add-in not being able to cope with an
>>excel11.xlb file bigger than 30KB


Seems unlikely but I suppose it's easy to test if it's true. A workaround
is to make your menu/toolbar customizations via macros in your Personal.xls,
deleted when Personal closes or at least with the commandbars 'temporary'
parameter set. That way they never hit the XLB.

--
Jim
"veryeavy" <(E-Mail Removed)> wrote in message
news0932EA6-E20A-42D4-918E-(E-Mail Removed)...
| Hi all,
|
| One quick specific question re one wee oddity I have noted with the
| following line of code:
|
| Dim btnLB3 As CommandBarButton
| Set btnLB3 =
| Application.CommandBars("SLBTbar").Controls.Add(Type:=msoControlButton,
| ID:=1561)
|
| which adds the "View Code" button to my custom toolbar "SLBTbar".
|
| However once added it is disabled when I try to use it from the workbook I
| created it from, but it works fine when other workbooks are activated.
|
| Sure this is easy peasy and I am just being stoopid.
|
|
| I have a general question surrounding this whole area - we have a problem
at
| work which we have been told is due to a key add-in not being able to cope
| with an excel11.xlb file bigger than 30KB. Obviously this severely limits
the
| amount of customisation we can do to our toolbars. Equally obviously our
IT
| bods are cretins. I am not an IT bod <grin>.
|
| I have seen the Debra Dalgleish approach using an add-in to creating
custom
| toolbars on the fly and also the John Walkenbach approach to saving and
| retrieving menu settings to a worksheet, and realise it would not be
rocket
| science to create a "save and retrieve" functionality for the whole
| menu/toolbar structure outside of the xlb file.
|
| There are obviously a number of questions:
|
| 1. Is it likely IT Dept talking sense with respect to a large add-in
falling
| over if the xlb file is too big? (i.e we can have an extensively
customised
| menu or the functionality of the add-in but not both).
| 2. If so has anyone already designed a fully fledged workaround to save
all
| a users menu/toolbar settings outside of the xlb file.
| 3. Any general pointers (obviously I am just messing around learning how
| this stuff works at the moment)
|
| Cheers,
|
|
|


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Most non built-in command bars invisible in Excel 2007... Tricky Microsoft Excel Programming 0 12th Mar 2008 10:59 AM
Re: Working with Command Buttons At runtime in VBA Scott M. Microsoft VB .NET 0 22nd Jan 2007 11:12 PM
command buttons not working =?Utf-8?B?S2V2aW4gTWNMZWFu?= Microsoft Dot NET 0 25th Aug 2005 07:38 PM
I have set up links in command buttons and they are not working. . =?Utf-8?B?bmVyYQ==?= Microsoft Access Security 1 18th Feb 2005 10:51 PM
Insepctor Command Bars and Buttons Sanjay Singh Microsoft Outlook Program Addins 1 6th Jul 2004 09:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:44 PM.