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
264 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

756 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