Consulting

Results 1 to 4 of 4

Thread: Solved: Where to Store Universal Name Definitions

  1. #1

    Solved: Where to Store Universal Name Definitions

    If I have a utility macro that other of my macros all use, then I tend to store the utility macro in my Personal.xls workbook and create a reference to Personal.xls in all my other workbooks.

    With that in mind, I also have some defined names for utility formulas which other workbooks use. I now copy all these defined names into each workbook. That seems less than elegant. I would like to be able (if possible) to store those special-case name definitions in Personal.xls in a fashion like I do with utility macros. How does one do such a thing (if possible)? Keep in mind that these names are workbook independent, so there is nothing in them that makes them dependent on any one workbook in order to execute.

  2. #2
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    So you want to just add the Named Ranges to new workbooks if needed?

    You could use a sheet in your personnal.xls workbook to store that data. One column for the name and one for the reference, then loop through those and add the Named Ranges to whatever workbook you want.

  3. #3
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by Cyberdude
    If I have a utility macro that other of my macros all use, then I tend to store the utility macro in my Personal.xls workbook and create a reference to Personal.xls in all my other workbooks.

    With that in mind, I also have some defined names for utility formulas which other workbooks use. I now copy all these defined names into each workbook. That seems less than elegant. I would like to be able (if possible) to store those special-case name definitions in Personal.xls in a fashion like I do with utility macros. How does one do such a thing (if possible)? Keep in mind that these names are workbook independent, so there is nothing in them that makes them dependent on any one workbook in order to execute.
    Why do you copy them, why not reference directly like

    =Personal.xls!theName

  4. #4
    Hmmmm ... I guess it never occurred to me that I could reference a defined name like that. Yeah, why don't I do that? Both suggestions solve the problem. Thanx fellas!


    P.S. I still can't mark this as solved.

Posting Permissions

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