Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Jan 2004
    Posts
    110
    Thanks
    0
    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.

  2. #2
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    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,
    Rudi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •