+ Reply to Thread
Results 1 to 4 of 4

I need to copy macros from personal workbook to new workbook

  1. #1
    Registered User
    Join Date
    01-06-2014
    Location
    Arkansas
    MS-Off Ver
    Excel 2010
    Posts
    1

    I need to copy macros from personal workbook to new workbook

    I am new to using macros.... I have created some macros; they have been saved in my personal. I would like to copy them in to a worksheet template so they will allow other users to access. What would you suggest as to the best location in the template?

    Thank you for your help in advance

    Bill

  2. #2
    Forum Contributor
    Join Date
    12-31-2012
    Location
    Jhang, Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: I need to copy macros from personal workbook to new workbook

    1. Open your template worksheet and Press Alt+F11 to open VBA editor.
    2. Go to Insert-->Module in visual basic for applications editor window.
    3. Expand VBAProject (Personal.xlsb) from left side (Project Explorer).
    4. Open recorded macros modules (Module1, Module2,...) one by one by double clicking and copy the entire code from each module to the Template worksheets newly inserted module (Module1) created in step 2.

  3. #3
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: I need to copy macros from personal workbook to new workbook

    Welcome Bill,

    a. First, go to the Visual Basic Environment.
    b. Press CTRL-R to get the 'Project Explorer.
    c. Press F4 to get the 'Properties' Box.
    d. Click on 'Module1' or any other Macro code module.
    e. In the name box, change the name from 'Module1' to something useful like 'ModUtilities' or 'ModUtilitiesGeneral' or 'ModUtilitiesProject' or 'ModSummary'.

    Each module can contain several Macros. Put the Macros into one or more 'Modules' that
    make sense to you. After you've done that, you can copy them to the template by using:
    a. Cut and Paste into a new module you created on the Template. You then have to rename the
    Module on the Template, or
    b. Right Click on the Module you want in the Template.
    Left Click on 'Export File.' The Module will be saved and (will not be deleted from the source) .
    Right Click on the Template in 'Project Explorer (assuming the Template file is open).
    Left Click on 'Import File' and the selected file will be imported to the Template.

    My personal preference is to NOT store Macros in the PERSONAL area even though they are common to all workbooks, with the exception of several one liners I use in developing software such as turning Sheet Protection On or Off.

    I hope this helps.

    Lewis

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: I need to copy macros from personal workbook to new workbook

    In case you are looking to do this with VBA look here.

    http://www.cpearson.com/Excel/vbe.aspx

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Can't access macros in personal.xlsb workbook from macros in a second workbook
    By JimFM in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-24-2013, 03:35 PM
  2. VBA macros:Personal Macro Workbook
    By Larry.LeBlanc@O in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-18-2010, 07:22 PM
  3. Replies: 2
    Last Post: 08-17-2009, 02:07 AM
  4. Macros in Personal workbook
    By gertz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-22-2008, 10:46 AM
  5. Copying macros from a file to Personal Workbook
    By excel nubie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-04-2007, 12:31 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1