Attach a macro using another macro.


Posted by Steve Mathews on February 04, 2002 1:24 PM

I have created a nice add-in that basicly does some formmating on the worksheet. I was thinking about creating another macro to add to these workbooks after they were formatted, but I had the thought of having my add-in attach the new macro to the worksheet. Does anyone know how to do this?

Thanks,

I have created a nice add-in that basically does some formatting on the worksheet. I was thinking about creating another macro to add to these workbooks after they were formatted, but I had the thought of having my add-in attach the new macro to the worksheet. Does anyone know how to do this?

Thanks,

Steve Mathews
KnowledgeNet
Sr. Courseware Developer / Product Development: Interactive



Posted by Ivan F Moala on February 05, 2002 3:48 AM

Steve this can be done;
See example otherwise email me for example
Addin;

The easiest way is to create the Module 1st in your addin then export it out and import it into
the activeworkbook......

have a look @ online help for VBComponent Object

You should be able to get some idea from here.


bit longwinded to explian but if interested??


ivan