PC Review


Reply
Thread Tools Rate Thread

Custom Toolbar Changes Not Portable

 
 
Len Excel Manic Porzio
Guest
Posts: n/a
 
      27th Mar 2008
In Excel 2003 we "attached" a custom toolbar menu to a spreadsheet and saved
it locally which persists properly. However, if we copy the file to
removable media and move it to another machine, we see an old version of the
menu rather than the most recent menu additions. We have erased all files
and tried saving directly from Excel as well as dragging and droping the file
but nothing seems to help.

How can we fix this? Is there a work around?
(E-Mail Removed)

 
Reply With Quote
 
 
 
 
paul.robinson@it-tallaght.ie
Guest
Posts: n/a
 
      27th Mar 2008
Hi
When a menubar is added, it is added to the Excel application, so you
must delete it from there too. I'm assuming your menubar is on the
main Excel menubar.
Add something like this to the top of the code that installs the new
menubar

Set cbWSMenuBar = CommandBars("Worksheet Menu Bar")

An old menubar may still exist. So delete it just in case
On Error Resume Next
cbWSMenuBar.Controls("myOldMenu").Delete
On Error GoTo 0

of course, "myOldMenu" may be the same name as your new menu.
You should put these lines at the top of any code which adds a
menubar, as an improper Excel shutdown might leave the menubar there
and the next time you add the menu bar you will have two of them.
regards
Paul

On Mar 27, 2:37*pm, Len Excel Manic Porzio <Len Excel Manic
Por...@discussions.microsoft.com> wrote:
> In Excel 2003 we "attached" a custom toolbar menu to a spreadsheet and saved
> it locally which persists properly. *However, if we copy the file to
> removable media and move it to another machine, we see an old version of the
> menu rather than the most recent menu additions. *We have erased all files
> and tried saving directly from Excel as well as dragging and droping the file
> but nothing seems to help.
>
> How can we fix this? *Is there a work around?
> len.por...@gmail.com


 
Reply With Quote
 
Len Excel Manic Porzio
Guest
Posts: n/a
 
      27th Mar 2008
Thanks Paul. I will try something like this, however the menus were set up
manually so I'm surprised at Excel's behaviour.

Does it matter that this was a custom tool bar installed vertically along
the right side of the frame?

"(E-Mail Removed)" wrote:

> Hi
> When a menubar is added, it is added to the Excel application, so you
> must delete it from there too. I'm assuming your menubar is on the
> main Excel menubar.
> Add something like this to the top of the code that installs the new
> menubar
>
> Set cbWSMenuBar = CommandBars("Worksheet Menu Bar")
>
> An old menubar may still exist. So delete it just in case
> On Error Resume Next
> cbWSMenuBar.Controls("myOldMenu").Delete
> On Error GoTo 0
>
> of course, "myOldMenu" may be the same name as your new menu.
> You should put these lines at the top of any code which adds a
> menubar, as an improper Excel shutdown might leave the menubar there
> and the next time you add the menu bar you will have two of them.
> regards
> Paul
>
> On Mar 27, 2:37 pm, Len Excel Manic Porzio <Len Excel Manic
> Por...@discussions.microsoft.com> wrote:
> > In Excel 2003 we "attached" a custom toolbar menu to a spreadsheet and saved
> > it locally which persists properly. However, if we copy the file to
> > removable media and move it to another machine, we see an old version of the
> > menu rather than the most recent menu additions. We have erased all files
> > and tried saving directly from Excel as well as dragging and droping the file
> > but nothing seems to help.
> >
> > How can we fix this? Is there a work around?
> > len.por...@gmail.com

>
>

 
Reply With Quote
 
Jim Rech
Guest
Posts: n/a
 
      27th Mar 2008
"Attaching" toolbars does not work very well and that's why "pros" don't do
it. Rather they use code to create the toolbars on the fly.

One problem is that a toolbar attached to a workbook become a permanent part
of the Excel application. It's still there the next time you use Excel even
if the workbook with it attached is not opened. And furthermore, if Excel
already has a toolbar with the name "xxx" it takes precedence over one
attached to a workbook with the same name. So when you open a workbook with
an updated toolbar you still see the old toolbar.

So, when you want to update a toolbar, you must use View, Toolbars,
Customize, Toolbars to delete the current toolbar before you open the
workbook with the updated toolbar.

--
Jim
"Len Excel Manic Porzio" <(E-Mail Removed)>
wrote in message news:A905216B-5CA6-4220-901E-(E-Mail Removed)...
| Thanks Paul. I will try something like this, however the menus were set
up
| manually so I'm surprised at Excel's behaviour.
|
| Does it matter that this was a custom tool bar installed vertically along
| the right side of the frame?
|
| "(E-Mail Removed)" wrote:
|
| > Hi
| > When a menubar is added, it is added to the Excel application, so you
| > must delete it from there too. I'm assuming your menubar is on the
| > main Excel menubar.
| > Add something like this to the top of the code that installs the new
| > menubar
| >
| > Set cbWSMenuBar = CommandBars("Worksheet Menu Bar")
| >
| > An old menubar may still exist. So delete it just in case
| > On Error Resume Next
| > cbWSMenuBar.Controls("myOldMenu").Delete
| > On Error GoTo 0
| >
| > of course, "myOldMenu" may be the same name as your new menu.
| > You should put these lines at the top of any code which adds a
| > menubar, as an improper Excel shutdown might leave the menubar there
| > and the next time you add the menu bar you will have two of them.
| > regards
| > Paul
| >
| > On Mar 27, 2:37 pm, Len Excel Manic Porzio <Len Excel Manic
| > Por...@discussions.microsoft.com> wrote:
| > > In Excel 2003 we "attached" a custom toolbar menu to a spreadsheet and
saved
| > > it locally which persists properly. However, if we copy the file to
| > > removable media and move it to another machine, we see an old version
of the
| > > menu rather than the most recent menu additions. We have erased all
files
| > > and tried saving directly from Excel as well as dragging and droping
the file
| > > but nothing seems to help.
| > >
| > > How can we fix this? Is there a work around?
| > > len.por...@gmail.com
| >
| >


 
Reply With Quote
 
Len Excel Manic Porzio
Guest
Posts: n/a
 
      27th Mar 2008
Great information Jim. Thanks again.

"Jim Rech" wrote:

> "Attaching" toolbars does not work very well and that's why "pros" don't do
> it. Rather they use code to create the toolbars on the fly.
>
> One problem is that a toolbar attached to a workbook become a permanent part
> of the Excel application. It's still there the next time you use Excel even
> if the workbook with it attached is not opened. And furthermore, if Excel
> already has a toolbar with the name "xxx" it takes precedence over one
> attached to a workbook with the same name. So when you open a workbook with
> an updated toolbar you still see the old toolbar.
>
> So, when you want to update a toolbar, you must use View, Toolbars,
> Customize, Toolbars to delete the current toolbar before you open the
> workbook with the updated toolbar.
>
> --
> Jim
> "Len Excel Manic Porzio" <(E-Mail Removed)>
> wrote in message news:A905216B-5CA6-4220-901E-(E-Mail Removed)...
> | Thanks Paul. I will try something like this, however the menus were set
> up
> | manually so I'm surprised at Excel's behaviour.
> |
> | Does it matter that this was a custom tool bar installed vertically along
> | the right side of the frame?
> |
> | "(E-Mail Removed)" wrote:
> |
> | > Hi
> | > When a menubar is added, it is added to the Excel application, so you
> | > must delete it from there too. I'm assuming your menubar is on the
> | > main Excel menubar.
> | > Add something like this to the top of the code that installs the new
> | > menubar
> | >
> | > Set cbWSMenuBar = CommandBars("Worksheet Menu Bar")
> | >
> | > An old menubar may still exist. So delete it just in case
> | > On Error Resume Next
> | > cbWSMenuBar.Controls("myOldMenu").Delete
> | > On Error GoTo 0
> | >
> | > of course, "myOldMenu" may be the same name as your new menu.
> | > You should put these lines at the top of any code which adds a
> | > menubar, as an improper Excel shutdown might leave the menubar there
> | > and the next time you add the menu bar you will have two of them.
> | > regards
> | > Paul
> | >
> | > On Mar 27, 2:37 pm, Len Excel Manic Porzio <Len Excel Manic
> | > Por...@discussions.microsoft.com> wrote:
> | > > In Excel 2003 we "attached" a custom toolbar menu to a spreadsheet and
> saved
> | > > it locally which persists properly. However, if we copy the file to
> | > > removable media and move it to another machine, we see an old version
> of the
> | > > menu rather than the most recent menu additions. We have erased all
> files
> | > > and tried saving directly from Excel as well as dragging and droping
> the file
> | > > but nothing seems to help.
> | > >
> | > > How can we fix this? Is there a work around?
> | > > len.por...@gmail.com
> | >
> | >
>
>
>

 
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
hide custom toolbar from Toolbar list tracktraining Microsoft Excel Programming 3 26th Feb 2009 09:28 PM
Adding custom buttons to the Standard toolbar versus a custom toolbar cainrandom@gmail.com Microsoft Outlook Program Addins 2 9th Oct 2008 05:13 PM
Saving custom toolbar or toolbar location to specific template Joseph N. Microsoft Word Document Management 0 16th Jan 2007 04:48 AM
custom toolbar buttons are saved where? Excel loads twice bymistake and all my custom toolbar buttons get gone!!! Kevin Waite Microsoft Excel Programming 2 3rd Mar 2004 03:31 PM
custom toolbar buttons are saved where? Excel loads twice bymistake and all my custom toolbar buttons get gone!!! Kevin Waite Microsoft Excel Discussion 2 3rd Mar 2004 12:32 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:01 AM.