Julien M
Julien M

Reputation: 676

Excel: quick access to an external macro from any spreadsheet

I have a bunch of csv files that I create everyday and that I want to format nicely with colors and stuff. So I wrote a macro that do all I want.

Now I'm looking for the most practical way to call that macro from Excel. It looks like macros are stored in the spreadsheet and can't be "global" or "external". So when I open a csv, I need to create a new macro, paste my vb code, and run it. It would be great if I could add a button to Excel toolbar, or at least open a menu that will let me select the macro and run it.

It looks like one answer could be to create an excel add-in, but I'm not sure this is the right way to go.

Thanks a lot for your help

Upvotes: 0

Views: 446

Answers (1)

MP24
MP24

Reputation: 3200

This will work with a so-called "Personal Macro Workbook". In Excel 2010, it will be called Personal.xlsb and reside somewhere in your users directory.

See http://office.microsoft.com/en-001/excel-help/copy-your-macros-to-a-personal-macro-workbook-HA102174076.aspx for details. This also applies with small variations to other versions of Excel.

Upvotes: 1

Related Questions