Addin >> Styles.Merge

galileogali

Well-known Member
Joined
Oct 14, 2005
Messages
748
I want have MyStyles in all the books.

Create a Addin, MyStyles.xla, where are the custom styles
In a standard module put this macro:
Code:
Sub Auto_open()
Application.ActiveWorkbook.Styles.Merge Application.ThisWorkbook
End Sub
Works only when the two books are open, but If call with the opening of a previously closed book, it produces an error
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
That only runs once when the add-in opens. You could assign a shortcut to the macro and run it at will.
 
Upvote 0
You are right:
I'm going to build an addin as a simple repository of styles and calling them with the Auto_Open (General Template) existing in XLSTART Libro1.xl* (Workbook.xlsx)



shg
Thank you very much
 
Upvote 0
Fine plan, I think. Post back if you get stuck.
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,865
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top