Home |
Search |
Today's Posts |
#2
![]() |
|||
|
|||
![]()
It belongs in the Workbook_Open event.
You need to delete it on Before_Close. ******************* ~Anne Troy www.OfficeArticles.com www.MyExpertsOnline.com "rgarber50" wrote in message ... I've written a macro that I want to fire using a command button. I wrote a macro that adds the button - and one that deletes it just fine. However I am having problems automating the adding and the deleting of the button on the standard toolbar - I only want it available for a particular workbook. I thought I should be using an event procedure. So I've tried different combinations of: Open Before close Workbook activate deactivate. In the event procedures I am either calling a procedure in a standard module that adds the button, or a procedure that deletes the button on the standard toolbar. Sometimes it runs fine - other times it errors out - sometimes I end up with multiple buttons. I want to be able to be able to activate another workbook and have the btn deleted = when back add it again. I also want to be able to close the workbook and have the button deleted. Thanks for any suggestions. Richard -- rgarber50 ------------------------------------------------------------------------ rgarber50's Profile: http://www.excelforum.com/member.php...o&userid=11350 View this thread: http://www.excelforum.com/showthread...hreadid=386011 |