macro in all existing excel

navinaaaaaa

Board Regular
Joined
Mar 22, 2009
Messages
50
I have many excel files in a folder.

I have written a macro.

I want to paste this macro in each of the excel files, so that i can run the macro from any of the existing excel files.

Kindly suggest how can this be made possible.

Thanks in advance.
 

Some videos you may like

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

lenze

Legend
Joined
Feb 18, 2002
Messages
13,690
No need to put the macro in each file. Simply place it in your Personal.xls file. With Excel open, choose Window>Unhide.Personal.xls. Place the code in it and rehide. Save. If you don't have a Personal.xls, choose Toosl>Macros>Record New Macro. For store in, choose Personal.xls. Select Record, Select End Record. Excel will now create a Personal.xls for you. Any macro in this file will then be available for all open workbooks.
HTH
lenze
 

navinaaaaaa

Board Regular
Joined
Mar 22, 2009
Messages
50
Thanks for the reply.

But ,my precise requirement is to have the macro in the excel itself.
 

Smitty

Legend
Joined
May 15, 2003
Messages
29,536
It will be in Excel. Using Personal.xls makes code available to any open workbook.
 

navinaaaaaa

Board Regular
Joined
Mar 22, 2009
Messages
50

ADVERTISEMENT

I am not able to understand how to use this personal.xls.

am using excel 2007
 

ColinKJ

Well-known Member
Joined
Jan 27, 2009
Messages
983
navinaaaaaa,

Follow the instructions and crerate the personal.xls., which when created, will load and be available everytime you open XL. Any Macro/Routines you write in it can be run / activated either from Ctrl+key or assigned to a button on a tool bar.

I created one about two months ago and wouldn't be without it now.

ColinKJ
 

texasalynn

Well-known Member
Joined
May 19, 2002
Messages
8,458
in excel 2007 click on the office button in the upper left and select Excel Options, click on the Show Developer tab in the ribbon, click ok. Now Developer is a ribbon option, click record macro, click on the drop-down Store macro in and select Personal. This will create the personal.xls workbook.

HTH
 

Watch MrExcel Video

Forum statistics

Threads
1,122,804
Messages
5,598,168
Members
414,215
Latest member
SRGDZMCS

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
Top