+ Reply to Thread
Results 1 to 14 of 14

Calling Personal.xls functions without needing a 'personal.xls!' prefix

  1. #1
    Registered User
    Join Date
    03-26-2009
    Location
    New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    26

    Calling Personal.xls functions without needing a 'personal.xls!' prefix

    I have VBA functions saved in Personal.xls, which I need to call with a 'personal.xls!' prefix, or I get the #NAME? error. I do have the Personal.xls file open but hidden.

    Is there any way to have the personal.xls functions be global, and not require the personal.xls! prefix?

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Calling Personal.xls functions without needing a 'personal.xls!' prefix

    In the VBE, name the project in Personal.xls -- e.g., mine is projPersonal. Then set a reference in your default template.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    03-26-2009
    Location
    New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Calling Personal.xls functions without needing a 'personal.xls!' prefix

    Thanks. Seems the project is already titled projPersonal, but in the Available References list, I don't see projPersonal displayed even though I have the Personal.xls file open and projPersonal is displayed on the left. Do I have to do something to make it listed under Available References?

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Calling Personal.xls functions without needing a 'personal.xls!' prefix

    No, it should appear.

  5. #5
    Registered User
    Join Date
    03-26-2009
    Location
    New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Calling Personal.xls functions without needing a 'personal.xls!' prefix

    It doesn't for me, either alphabetically or in the short list of non-alphabetical references at the top. I tried renaming it 'AAAprojPersonal' to make it easier to find in case I somehow missed it (the list is large), but I still don't see it. Looked under where Personal would be alphabetically as well.

  6. #6
    Registered User
    Join Date
    03-26-2009
    Location
    New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Calling Personal.xls functions without needing a 'personal.xls!' prefix

    In the References window I went to Browse and located my PERSONAL.XLS file. Opening that caused projPersonal to appear at the bottom of the Available References list, but when I checked it and hit OK I get the error 'Name conflicts with existing module, project, or object library'.

  7. #7
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Calling Personal.xls functions without needing a 'personal.xls!' prefix

    If you set the IsAddin property of the Personal.xls to True, then you don't need the prefix. Of course, none of your macros will appear in the macro list...
    Remember what the dormouse said
    Feed your head

  8. #8
    Registered User
    Join Date
    03-26-2009
    Location
    New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Calling Personal.xls functions without needing a 'personal.xls!' prefix

    Quote Originally Posted by romperstomper View Post
    If you set the IsAddin property of the Personal.xls to True, then you don't need the prefix. Of course, none of your macros will appear in the macro list...
    Thanks, that worked for the VBA functions I don't have any macros so I'm not sure what the effect there is.

  9. #9
    Registered User
    Join Date
    03-26-2009
    Location
    New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Calling Personal.xls functions without needing a 'personal.xls!' prefix

    Seems that this actually isn't saving once I quit Excel. After I change IsAddin to True and save in the VB editor, I don't need the prefix - but if I quit Excel, then the prefix becomes needed again, and IsAddin reverts to False.

    How can I have this change stick?

  10. #10
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Calling Personal.xls functions without needing a 'personal.xls!' prefix

    Change the property and then in the Immediate Window type:
    Please Login or Register  to view this content.
    and press enter

  11. #11
    Registered User
    Join Date
    03-26-2009
    Location
    New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Calling Personal.xls functions without needing a 'personal.xls!' prefix

    Thanks, that seems to have the same effect as saving from the save icon though, which is how I saved previously. The value doesn't stay True on reopening.

    When I make IsAddin True and save, either by icon or immediate window, and close the VB editor, Personal.xls disappears - it closes if I had it open, and if I had it hidden I can no longer unhide it as the 'Unhide' option in the Windows menu is greyed out. And I can use the personal.xls functions without the prefix, which is what I want.

    But if I exit Excel, upon reopening, Personal.xls is open as the default instead of Book1. And the IsAddin property is False once again. So prefixes are needed again.

    Is there some other step I'm missing?

  12. #12
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Calling Personal.xls functions without needing a 'personal.xls!' prefix

    Why not simply create an addin instead of PERSONAL.xls(m)?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  13. #13
    Registered User
    Join Date
    03-26-2009
    Location
    New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Calling Personal.xls functions without needing a 'personal.xls!' prefix

    I don't know how to do that. Where can I find a good tutorial for that?

    Might there be some reason why things that are supposed to work don't work for me? e.g., projPersonal not being listed under Available References, and the IsAddin value not saving.

  14. #14
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Calling Personal.xls functions without needing a 'personal.xls!' prefix

    See this article

    basically move all the code to a new workbook, or unhide personal workbook then save it as a new name. Then follow the steps to save it as an addin

+ 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