Consulting

Results 1 to 8 of 8

Thread: How to Add a File to References List with VBA

  1. #1

    How to Add a File to References List with VBA

    OK, I'm getting nowhere trying to get Excel to open Personal.xls at startup.
    Is there a way to write a macro that will add Personal.xls to the References list when I first open a workbook?

    Personal.xls doesn't get opened apparently because it's not on the References list of some, but not all, workbooks. If I add it to the Reference list, why doesn't it stay there when I close the workbook??

    I gotta find a way to make Excel load Personal . . .

  2. #2
    VBAX Expert JP2112's Avatar
    Joined
    Oct 2008
    Location
    Astoria, NY
    Posts
    590
    Location
    I thought Excel always opened personal.xls, since it's in the XLSTART folder? Or am I missing something.

  3. #3
    I thought the same way, but believe me, it just isn't happening when some of my files are opened. I found another guy in a different forum who is having the same problem. When I did a Google on the problem, a flood of references came out. (Sigh)

    I just tried to open it with a VBA "OPEN" statement as the first statement in the WORKBOOK_OPEN macro, and it said that it couldn't find Personal. That's strange since I had the full path included. Now THAT'S strange.
    Sid

  4. #4
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Have you tried repairing the Office installation?
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  5. #5
    Not yet. I tried to find Detect and Repair, but so far Help (where it is supposed to be) has been unable to find it. That's also sorta weird. (moan) It seems to me that this ought to be some sort of corruption, since many of my workbooks are functioning OK . . . but alas, many are not.

    Is there some sort of code that I can use at workbook open time that will load Personal? The problem is that I don't think it's a workbook open problem. I suspect it is a problem with establishing Personal as a reference. I can do that manually by doing a browse on the Reference List then telling it the name of the workbook to add. But that's a one-time fix that has to be done everytime I open the affected workbook.

  6. #6
    VBAX Expert JP2112's Avatar
    Joined
    Oct 2008
    Location
    Astoria, NY
    Posts
    590
    Location
    It makes no sense. Where is your personal.xls located (the path)?

  7. #7
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,729
    Location
    What version of Excel?

    If it's 2007, goto Options, Add-ins, and "Manage: Disabled Items"

    See if Personal is disabled. If so, Enable it

    Paul

  8. #8
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by Cyberdude
    Not yet. I tried to find Detect and Repair, but so far Help (where it is supposed to be) has been unable to find it.
    Office Button>Excel Options>run Microsoft Office Diagnostics
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

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