PDA

View Full Version : How to Add a File to References List with VBA



Cyberdude
10-08-2009, 04:55 PM
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 . . .

JP2112
10-08-2009, 06:36 PM
I thought Excel always opened personal.xls, since it's in the XLSTART folder? Or am I missing something.

Cyberdude
10-08-2009, 08:16 PM
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

mdmackillop
10-09-2009, 06:10 AM
Have you tried repairing the Office installation?

Cyberdude
10-09-2009, 09:32 AM
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.

JP2112
10-09-2009, 09:55 AM
It makes no sense. Where is your personal.xls located (the path)?

Paul_Hossler
10-09-2009, 02:12 PM
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

xld
10-09-2009, 02:16 PM
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