 |

04-07-2003, 07:02 AM
|
|
Newcomer
|
|
Join Date: Apr 2003
Posts: 2
|
|
how to make macros available for all files
|
Hi Everybody
I am new, as it is going to be obvious from my question. I used macros to find certain cells (heading of data columns) running them from custom menu items. I had to reinstall everything on my PC so I lost these macros, however before that I had saved a *.bas file.
I imported this file but the macros only work in the Excel file in which I imported. Could someone tell me how I can make these macros available for all the Excel files, please?
Thanks,
Zoltan
|
|

04-07-2003, 07:06 AM
|
|
Just another Excel nerd
Retired Moderator * Guru *
|
|
Join Date: Feb 2000
Location: Michigan, USA
Posts: 2,624
|
|
|
They should work for all of them, unless they are using the filename somewhere or the name of the Workbook.
|
__________________
"The face of a child can say it all, especially the mouth part of the face." - Jack Handey
|

04-07-2003, 07:53 AM
|
|
Newcomer
|
|
Join Date: Apr 2003
Posts: 2
|
|
|
Hi Mill,
Thanks, that was a really quick answer. Yes, you are right they refer to the workbook, in which I imported the bas file. But I don’t know how to avoid this. Here it is what I have done step by step, maybe this helps:
I opened Excel then from menu Tools>Macro>Visual Basic Editor
In the VBE File>Import File (as the Import File command cannot be used if there is no opened workbook, I opened one). I imported the bas file. I closed VBE and I set up the custom menu referring to the macros. I saved this workbook.
When I open another workbook, the menu items work fine as long as I did not delete the above workbook, so this is a solution but I guess there is a proper one.
Also could you tell me whether I can save these customized menus and reload them if I have to reinstall my PC again, please?
Thanks!!!
Zoltan
PS. Maybe I wasn’t specific enough before. I have to work with a lot of workbook and I want to avoid to load the macros again and again and to modify the menu.
|
|

04-07-2003, 08:15 AM
|
|
Just another Excel nerd
Retired Moderator * Guru *
|
|
Join Date: Feb 2000
Location: Michigan, USA
Posts: 2,624
|
|
|
If I'm understanding you correctly, I think that you'll want to create an Add-In to do this. That way, your menus will be available to you as long as that Add-In is loaded (which would happen automatically if you wanted it to).
If your menus are added in the Workbook.Open event, then try saving the workbook as an Add-In (pick *.xla from the Save As type box).
|
__________________
"The face of a child can say it all, especially the mouth part of the face." - Jack Handey
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|