Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default to remove a custom Toolbar Button & macro

I've put macro in module, then make a custom button on the toolbar to invoke
a macro.(according to excel help):

--------------------------------------
Create a toolbar button that runs your macro

1. On the Tools menu, click Customize, and then click the
Commands tab.

2. Under Categories, click Macros.

3. Drag the custom button to the toolbar where you want it.

4. On the Customize dialog box, click Modify Selection,
and then click Assign Macro.

5. In the Assign Macro dialog box, click the name of your
macro, and then click OK.

6. To change the appearance of the button, click Modify
Selection again, point to Change Button Image, and click one of the
available images; or click Edit Button Image and use the Button Editor to
create your own image.

7. Click Close.
-----------------------------------------------------

But something was wrong when I've assigned macro, and I find that this
custom Toolbar button appers in all my Excel documents.

When I click on it, it show that workbook contains macros, though there was
no macro earlier. I find that this button attach "Module1" macro to Excel
file when I click on it. So, all Excel document now have this nasty button,
that insert macro in workbook.

How to remove this Toolbar Button from all Excel documents? How to remove
this unwanted macro from workbooks where this module has been already
inserted?

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default to remove a custom Toolbar Button & macro

But something was wrong when I've assigned macro

No, nothing is wrong, this is just how Excel works. Toolbars do not belong
to a workbook, even the workbook that the macros assigned to the toolbar are
in. Toolbars belong to Excel. Once you create one it will be there
regardless of which workbooks are present. To get rid of it you have to
delete it manually or through code. To control a toolbar the way you want
requires using VB code with the Commandbars object. This isn't brain
surgery but it is something that takes some time and study to get the hang
of. If you don't want to go down this road you might be better off just
putting a button on your worksheet(s) that runs your macro.

--
Jim
"luminore" wrote in message
...
| I've put macro in module, then make a custom button on the toolbar to
invoke
| a macro.(according to excel help):
|
| --------------------------------------
| Create a toolbar button that runs your macro
|
| 1. On the Tools menu, click Customize, and then click the
| Commands tab.
|
| 2. Under Categories, click Macros.
|
| 3. Drag the custom button to the toolbar where you want it.
|
| 4. On the Customize dialog box, click Modify Selection,
| and then click Assign Macro.
|
| 5. In the Assign Macro dialog box, click the name of your
| macro, and then click OK.
|
| 6. To change the appearance of the button, click Modify
| Selection again, point to Change Button Image, and click one of the
| available images; or click Edit Button Image and use the Button Editor to
| create your own image.
|
| 7. Click Close.
| -----------------------------------------------------
|
| But something was wrong when I've assigned macro, and I find that this
| custom Toolbar button appers in all my Excel documents.
|
| When I click on it, it show that workbook contains macros, though there
was
| no macro earlier. I find that this button attach "Module1" macro to Excel
| file when I click on it. So, all Excel document now have this nasty
button,
| that insert macro in workbook.
|
| How to remove this Toolbar Button from all Excel documents? How to remove
| this unwanted macro from workbooks where this module has been already
| inserted?
|
| Thanks
|
|


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
Excel 2003 - assign macro to custom toolbar button Candace Excel Discussion (Misc queries) 1 August 10th 09 12:14 PM
Lost new custom toolbar button with its macro hmm Excel Discussion (Misc queries) 6 July 4th 07 12:26 AM
Invoking a Visual Basic macro from a Custom Toolbar Button [email protected] Excel Worksheet Functions 2 March 1st 07 10:48 AM
How do I remove a non-toolbar custom button from a sheet? AaronInCarolina Excel Programming 3 September 9th 05 09:13 PM
Assign macro to toolbar custom button? amescha Excel Programming 5 September 27th 04 05:31 PM


All times are GMT +1. The time now is 09:39 PM.

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"