Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Copy vb module in all excel sheets
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. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Copy vb module in all excel sheets
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 "sohraaz" wrote: 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy Excel sheets | Excel Discussion (Misc queries) | |||
code in module A to not execute a Worksheet_SelectionChange sub of another module | Excel Discussion (Misc queries) | |||
How do I copy a new module to 200 workbooks with a macro? | Excel Worksheet Functions | |||
in VBA Sheets("mysheet").Copy Befo=Sheets(1) how do i get a reference to the newly created copy of this sheet? | Excel Worksheet Functions | |||
how do I copy excel sheets with headers | Excel Worksheet Functions |