Results 1 to 2 of 2
Thread: Macro (MS Excel)
2004-11-15, 07:35 #1
- Join Date
- Jan 2004
- Thanked 0 Times in 0 Posts
Macro (MS Excel)
I have created some macros in the personal workbook in my office PC which i use with various worksheets . As I have laptop at home I emailed the worksheet to my home address. Though the worksheets have been detached in the home lap top the Macros are not wkg as it seems that the macros are left behind in the office PC. Can someone tell me how to transfer (email) worksheets with macros.
2004-11-15, 08:37 #2
- Join Date
- Feb 2004
- Cape Town, RSA
- Thanked 1 Time in 1 Post
Re: Macro (MS Excel)
If the macros are in the personal macro workbook, they are not stored in the current workbook that you emailed. You will need to open the personal macro workbook and copy/export the macros from it.
Here are some steps:
1. Open the workbook that you emailed.
2. Go to the WINDOW menu and choose UNHIDE, and select PERSONAL.XLS.
3. Press ALT + F11 (to open the VBA editor)
4. Press CTRL + R (to open the Projects window, if necessary)
5. Find the VBAProject (Personal.xls)
6. Double click on the folder called Modules
7. Right click on the Module 1 (or any module under this project. Your code is stored here!)
8. Choose Export file. (This saves a Basics File, .bas) Save to the C: and email this file.
9. When you get to your other PC, open your email and save the .bas file to your harddrive.
10. Open Excel and press ALT + F11.
11. Right click on the VBAProject (Personal.xls) and choose IMPORT FILE.
12. Point to the .bas file to import into the Personal Macro Workbook!
PS. If the VBA editor does not have a reference to the VBAProject (Personal.xls), then record a macro and store it in the personal macro workbook. Stop the macro and then follow the steps from step 9.
This should transfer the macro. Alternative is to simply copy and paste the code between modules in the personal macro workbook. To insert more modules, select the VBAProject (Personal.xls), and choose INSERT | MODULE in the VBA Editor.
Hope this helps!Regards,