How to combine multiple VBA macros into one add-in file for Excel -
i have written 4 5 macros excel 2010, want add of these macros custom tab in ribbon buttons. want install macros 1 complete package (or add-in). have installed 1 macro creating customui package of visual studio, don't know how add other macros same add-in.
it depends on you've stored macro. instance if macro saved in module (within add-in file), add event handler call function specified in customui. example have 2 macros, 1 called 'pricingtaxable' , 1 called 'pricingperformance'.
events handlers in module:
sub pricingtaxable_eventhandler(control iribboncontrol) pricingtaxable end sub sub pricingperformance_eventhandler(control iribboncontrol) pricingperformance end sub and customui xml code (find event handler , function names know do):
<customui xmlns="http://schemas.microsoft.com/office/2009/07/customui"> <ribbon> <tabs> <tab id="customtab" label="pricing" insertaftermso="tabhome"> <group id="customgroup1" label="taxable income"> <button id="custombutton1" label="taxable income" size="large" onaction="pricingtaxable_eventhandler" imagemso="pivottablelayoutreportlayout" /> </group> <group id="customgroup2" label="performance sheets"> <button id="custombutton2" label="performance" size="large" onaction="pricingperformance_eventhandler" imagemso="charttrendline" /> </group> </tab> </tabs> </ribbon> </customui> refer here more help: https://erpcoder.wordpress.com/2012/05/30/how-to-create-a-custom-ribbon-addin-for-excel-2010/
Comments
Post a Comment