How to have a macro on other workbooks

daskalo

New Member
Joined
Jul 21, 2010
Messages
24
Hey guys, i know this is probably very simple, but I cant figure it out. Is there any way to create like a library of macros so every time i open excel the macros will be there without mattering on what sheet or workbook I am on?

Thanks

Edit: I use MS Excel 2007
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Wasn't it you who asked how to create a library of macros? How would you define one in the context you meant?

I personally use a number of methods of storing code. Personal.xls, add-ins, word documents, sample workbooks all with examples of different code in them either that I can use all the time or refer to as required. They are all library's of code in one way or another I guess.

Dom
 
Upvote 0
Domski,

Yes I did. You guys told me exactly what I need, but i was reading that excel has an option to create a Macro Library and you can use the macros on any sheet that you open without opening other sheets with the macros etc..
 
Upvote 0
Hmm... Interesting. I've never heard about a macro library like that o_O
I think it'd be impossible without manually recording the macros or else there would be no use of personal.xls.
 
Upvote 0
Yeah I also searched google and cant find anything on it lol. He probably does not know what he is talking about.
 
Upvote 0
Places like this are as good as you get to a code library to be honest hence why my own collection of code has never made it into a very organised state ;)

Dom
 
Upvote 0
LOL. Probably.
You can probably just add macros into your personal.xls and rename it into a library like categories
or place binary workbooks/macro-enabled workbooks into C:\Users\YourName\AppData\Roaming\Microsoft\Excel\XLSTART

and all the files in the directory will automatically start with excel.
 
Upvote 0
I have Module one which has several functions and subs in it. I have several other modules which are functions. I've tried importing all of it to the Personal.xls file to be available across all macros, but I only get ColstoNum available (I've followed directions from here:)

http://office.microsoft.com/en-us/e...l-macros-from-a-central-file-HA001087296.aspx

Module 1 looks like

Public Sub ColstoNum() ...some VBA
Public Sub Delete() ... some VBA
Public Function Add() ...some VBA

Module 2 through n have a function...

How come when I try to open another Excel file I'm only able to have ColstoNum available from the Personal.xls file even though I've imported the other modules?

Any help would be sincerely appreciated.
 
Upvote 0

Forum statistics

Threads
1,215,541
Messages
6,125,413
Members
449,223
Latest member
Narrian

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