Solved

After I import a macro into another version of Excel on a differnt computer how do I save it?

Posted on 2011-09-13
5
259 Views
Last Modified: 2012-05-12
I have exported a macro from an older computer with Excel 2003. I then imported it into a new computer with Excel 2010. I imported successfully. The problem is how do I save it for future use??? When I close Excel I get a “do you want to save book1” or something like that and I say no. When I reopen Excel the Macro’s not there but I don’t think I want to save Book1. I know it something to do with saving it to the personal.xls or something like that!

Thanks
0
Comment
Question by:Dan Purcell
5 Comments
 
LVL 14

Expert Comment

by:peetjh
ID: 36530087
Save the file as.xlsm (Macro Enabled Workbook) in the save as dialog box.
0
 
LVL 17

Expert Comment

by:andrewssd3
ID: 36530223
If you have imported it into your personal.xlsb (by right clicking on its project in the project explorer in VBA and selecting Import), you need to save your personal.xlsb.  Excel should prompt you to do this when you close it down, in which case say you want to save it.  You're right you do not want to save Book1.  You can explicitly save personal.xlsb by double clicking on your new module to edit it so it is active in the window, then clicking the Save icon in the VBA window toolbar.
0
 
LVL 4

Expert Comment

by:SafetyFish
ID: 36530253
If you wanted to save just the module itself, you could right click it in the Project Tree of the Developer View (alt+f11) and directly save the code as a .bas file. Then you can easily import it into any workbook you want without having to save a whole workbook.

Peetjh's solution may or may not be better for you. Macros stay with the workbooks they are created, editted, or imported in as long as the workbook is saved with it. However, if you don't want to save the workbook and just the macro code, saving a .bas may be more flexible for you.
0
 
LVL 17

Accepted Solution

by:
andrewssd3 earned 500 total points
ID: 36530263
If you did not get the prompt to save it, perhaps you did not already have a personal.xlsb and you actually imported it somewhere else.  You don't have a personal.xlsb by default.  The easiest way to get one is to record a trivial macro, and say Store Macro in Personal Macro Workbook.  This will create a new personal.xlsb - then look for this in the project explorer on the left hand side of the VBA window, and right click on it to Import your code.
0
 

Author Closing Comment

by:Dan Purcell
ID: 36530629
You all were so very helpful! I love this site. The computer didn't have a personal.xlsb yet, so after recording a macro and saving it I was able to import and save the new one.


Thanks to you all
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now