+ Reply to Thread
Results 1 to 2 of 2

Using macro / copy code without programmatic access

  1. #1
    Registered User
    Join Date
    06-30-2009
    Location
    Southern California, Earth
    MS-Off Ver
    Excel 2010
    Posts
    72

    Smile Using macro / copy code without programmatic access

    Anyone know how to do it?

    Please Login or Register  to view this content.
    I have 3 option buttons that will execute the code, but the file it is going on is dynamically generate via another macro. So I cannot simply copy the code over from another sheet. Is there any alternative than allowing programmatic access to Visual Basic Project?

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Using macro / copy code without programmatic access

    Hello hoffey,

    Place your macros in your Personal.xls workbook. Then any workbook can access them by name without having to VBA code into the workbook's VBA project.

    Personal.xls
    If this file already exists, Excel will automatically open it upon startup but will hide it from normal view. Personal.xls can be used to save your own macros or user defined functions which you may want available for general use. When saving a macro, you are given the option of whether to save it in the current workbook or in your Personal.xls file. Remember that if you give someone else a workbook which makes use of a function stored in your Personal.xls, the function won't be available to them and an error will occur in any cells where it has been used.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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