Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Joe Joe is offline
external usenet poster
 
Posts: 476
Default removing acontrol from the toolbar

Thanks kevin for your quick replay, how can I remove it then when I close the
workbook, so that I wouldn't find this button on other worksheets?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default removing acontrol from the toolbar

Application.CommandBars("Worksheet Menu Bar").Controls("MyControl").Delete

--
HTH...

Jim Thomlinson


"joe" wrote:

Thanks kevin for your quick replay, how can I remove it then when I close the
workbook, so that I wouldn't find this button on other worksheets?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default removing acontrol from the toolbar

You probably want to (if I understand the post correctly) want to add code to
the thisworkbook module to react to the Workbook Open / Workbook Activate
events to create the command button and to the Workbook Close / Workbook
Deactivate... If you want help with that just let me know...
--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

Application.CommandBars("Worksheet Menu Bar").Controls("MyControl").Delete

--
HTH...

Jim Thomlinson


"joe" wrote:

Thanks kevin for your quick replay, how can I remove it then when I close the
workbook, so that I wouldn't find this button on other worksheets?

  #4   Report Post  
Posted to microsoft.public.excel.programming
Joe Joe is offline
external usenet poster
 
Posts: 476
Default removing acontrol from the toolbar

Got me! Yes thats what I wanted to do.
I put the code in the thisworkbook_open and Deactivate events
1. I now can add a menu item in the menu bar, but not on the toolbar
2. I can't remove the items added

Need your help on this

"Jim Thomlinson" wrote:

You probably want to (if I understand the post correctly) want to add code to
the thisworkbook module to react to the Workbook Open / Workbook Activate
events to create the command button and to the Workbook Close / Workbook
Deactivate... If you want help with that just let me know...
--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

Application.CommandBars("Worksheet Menu Bar").Controls("MyControl").Delete

--
HTH...

Jim Thomlinson


"joe" wrote:

Thanks kevin for your quick replay, how can I remove it then when I close the
workbook, so that I wouldn't find this button on other worksheets?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default removing acontrol from the toolbar

Sorry about taking so long to get back to you. What you want to do is to
create a sub procedure to add the control and one to remove the control. Once
they are perfected then you can then just call these procedures from the
appropriate events. The other trick is that you want to have all of the
appropriate error handling to take care of any errors in your cdoe. Wtihout
error handling, the controls are bound to get stuck at some point when an
error occures. This is a fairly big project but if you take it one step at a
time it is not too bad to do. If you are still around and need more help post
a new thread and include some code with it.
--
HTH...

Jim Thomlinson


"joe" wrote:

Got me! Yes thats what I wanted to do.
I put the code in the thisworkbook_open and Deactivate events
1. I now can add a menu item in the menu bar, but not on the toolbar
2. I can't remove the items added

Need your help on this

"Jim Thomlinson" wrote:

You probably want to (if I understand the post correctly) want to add code to
the thisworkbook module to react to the Workbook Open / Workbook Activate
events to create the command button and to the Workbook Close / Workbook
Deactivate... If you want help with that just let me know...
--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

Application.CommandBars("Worksheet Menu Bar").Controls("MyControl").Delete

--
HTH...

Jim Thomlinson


"joe" wrote:

Thanks kevin for your quick replay, how can I remove it then when I close the
workbook, so that I wouldn't find this button on other worksheets?



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
Removing check boxes (forms toolbar) jvs Excel Worksheet Functions 1 November 11th 09 04:23 PM
Having problem removing toolbar envelope. UBR362 Excel Discussion (Misc queries) 1 February 19th 07 02:48 PM
Removing custom toolbar from Excel 2003 [email protected] Excel Discussion (Misc queries) 0 July 14th 06 05:00 PM
Removing "Reviewing" Toolbar permanently Joe H. Setting up and Configuration of Excel 1 January 25th 06 08:14 PM
removing a toolbar with code Papa Jonah Excel Programming 4 February 22nd 05 07:49 PM


All times are GMT +1. The time now is 05:35 PM.

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"