Copy vb module in all excel sheets

G

Guest

I create a module in vb for excel but this module works within only a one
sheet. I want to make this module as default so that, whenever i open any new
workbook or any previously saved woorkbook, this vb module loads
automatically on that workbook. And i would use this module according to my
need. I dont wants to copy/paste the module every time i open any workbook.
 
G

Guest

Under your Programs, MicrosoftOffice, there is a folder entitled "XLStart".
In this folder you need a file named personal.xls If it is already there
then it is being loaded automatically each time you load Excel -- you are not
seeing it because it has been "hidden" and should remain hidden.
From within your current excel session - switch to the VBE (Alt-F11)
In the Project window you should see the file personal.xls

Select it's standard code window and put your macro (paste) into it.
Make appropriate changes to your code such as using a reference to the
Activesheet, instead of any specifically named sheet, etc,,,,, then
Save the File.

Ext Completely out of Excel -- And then Load it afresh/Again.

You and even Customize your toolbar to have an icon tied directly to
Run your "MySpecialMacro" on demand.

If you do not have a personal.xls file in your XLstart folder - create one
from a new workbook in excel, saving it the the XLStart folder then go back
up to my earlier situation where you find that it exists and proceed. After
creating and before saving the personal.xls - select Format, Sheets, Hide <<
to hide it on loading...

HTH

Jim May

, do nothing << because--
Sounds like you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top