Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default commandbar management

Thanks Dave. That seems to make good sense, but it's uncharted territory for
me. Can you point me to a simple Add-in example, preferably with the
CommandBar implementation you're suggesting?
Cheers,
Mike
"Dave Peterson" wrote in message
...
If the commandbars are separate and distinct, then use unique names.

If the commandbars do the same thing, I think I would provide an addin
that
built the toolbar and remove it from each of the workbooks. By separating
the
code from the workbooks, it may become even easier to update when (not if)
things change.

me wrote:

Hi, I am having problems with custom commandbars. In the Open event I
create
a custom cb. I delete it in the BeforeClose event. If I open a second
file
that has the same code before closing the first, they collide and the 2nd
one isn't created. If I then close the first, the cb is deleted so I have
to
reopen the 2nd or run the code manually to create it. If I remove the
code
to delete the cb beforeclose, only the first one created stays open and
any
commands run run on the FIRST instance opened, even if it has been
closed.
Do I have to create the cb with a unique name, such as the name of the
file,
to avoid this? I'm creating many files from a single file with the code.
Do
I need to implement the code in a template, or something else?

Many thanks,
Mike


--

Dave Peterson



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default commandbar management

If you want to add an option to the worksheet menu bar, I really like the way
John Walkenbach does it in his menumaker workbook:
http://j-walk.com/ss/excel/tips/tip53.htm

Here's how I do it when I want a toolbar:
http://groups.google.co.uk/groups?th...5B41%40msn.com

me wrote:

Thanks Dave. That seems to make good sense, but it's uncharted territory for
me. Can you point me to a simple Add-in example, preferably with the
CommandBar implementation you're suggesting?
Cheers,
Mike
"Dave Peterson" wrote in message
...
If the commandbars are separate and distinct, then use unique names.

If the commandbars do the same thing, I think I would provide an addin
that
built the toolbar and remove it from each of the workbooks. By separating
the
code from the workbooks, it may become even easier to update when (not if)
things change.

me wrote:

Hi, I am having problems with custom commandbars. In the Open event I
create
a custom cb. I delete it in the BeforeClose event. If I open a second
file
that has the same code before closing the first, they collide and the 2nd
one isn't created. If I then close the first, the cb is deleted so I have
to
reopen the 2nd or run the code manually to create it. If I remove the
code
to delete the cb beforeclose, only the first one created stays open and
any
commands run run on the FIRST instance opened, even if it has been
closed.
Do I have to create the cb with a unique name, such as the name of the
file,
to avoid this? I'm creating many files from a single file with the code.
Do
I need to implement the code in a template, or something else?

Many thanks,
Mike


--

Dave Peterson


--

Dave Peterson
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
CommandBar swiederkehr Excel Programming 5 July 19th 05 04:58 PM
How control where the CommandBar will be placed? Gunnar Johansson[_5_] Excel Programming 4 May 9th 05 04:07 AM
CommandBar Resize purple Excel Programming 5 April 2nd 05 02:38 PM
Commandbar frustration. Julian Cox Excel Programming 6 July 23rd 04 08:57 PM
commandbar Greg Prost[_2_] Excel Programming 2 November 21st 03 11:42 AM


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