Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Removing check boxes (forms toolbar) | Excel Worksheet Functions | |||
Having problem removing toolbar envelope. | Excel Discussion (Misc queries) | |||
Removing custom toolbar from Excel 2003 | Excel Discussion (Misc queries) | |||
Removing "Reviewing" Toolbar permanently | Setting up and Configuration of Excel | |||
removing a toolbar with code | Excel Programming |