Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stand Alone Excel Macro

Tags:

excel

vba

I have a report that I run from a system once a week, and the data is exported into an excel document. I have set up the tool that exports the data to excel to do a decent job on formatting, but there is still more that I need to do once the data is in excel.

Is it possible to create a stand alone macro, save it in a Microsoft office folder and be able to call it after I open this file? I have written plenty of macros that are part of ONE given spreadsheet, but never tried one that was open to many spreadsheets.

IS it possible, and a starting direction of good resources of where I can learn how to achieve this goal? Thank you.

like image 939
cquadrini Avatar asked Jun 28 '12 18:06

cquadrini


People also ask

Can you run an Excel macro without Excel?

Without excel application, you cant able to perform any operation using macro. Macro is development part for excel application.It develop inside the excel.

Can you set a macro to run automatically?

Using Auto open method to run a macro automatically: Insert a New Module from Insert Menu. Copy the above code and Paste in the code window. Save the file as macro enabled workbook. Open the workbook to test it, it will Run a Macro Automatically.


1 Answers

...and be able to call it after I open this file?...

You have 2 very good options

1) Write and save your macro to Personal file. See this link for more information

Topic: Deploy your Excel macros from a central file

Link: http://office.microsoft.com/en-us/excel-help/deploy-your-excel-macros-from-a-central-file-HA001087296.aspx

Quote from the above link:

Have you ever wanted to use that really handy macro in all of your Excel worksheets? You can. This column explains how to place your macros in a file called personal.xls and make them available each time you start Excel.

2) Create an Add-In

Topic: Creating an Excel Add-in

Link: http://msdn.microsoft.com/en-us/library/aa140936%28v=office.10%29.aspx

Quote from the above link:

You create a Microsoft® Excel add-in by creating a workbook, adding code and custom toolbars and menu items to it, and saving it as an Excel add-in file.

like image 61
Siddharth Rout Avatar answered Oct 13 '22 10:10

Siddharth Rout