Terry
It doesn't sound like you've set a reference to the xla after you removed
the reference to the xls, which I think you need to do. I don't have
anything close to a cogent explanation for you, but you might read this
thread to get you a little closer
http://www.google.com/groups?threadm...D97F%40msn.com
--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.
"Terry von Gease" wrote in message
...
Start out with 2 files:
1. data.xls
2.code.xls
The data.xls file has a reference to code.xls set in the VB editor via
Tools-References.. This works just fine.
Now then, I run Excel, open code.xls, and do a saveas to an xla file:
code.xla. I use a directory other than the one Excel has selected for such
things: I use C:\ my_dir. It doesn't seem to matter to what follows
whether
I use Excel's preferred directory or not, I've tried it both ways.
I then invoke Tools-Addins... and browse about and select
C:\my_dir\code.xla. It shows up and all seems well.
I close Excel.
I run data.xls with macros disabled and remove the reference to code.xls
via
the VB editor Tools-References..
I save data.xls
I close Excel
I open data.xls and it stops proclaiming that it can't find a function
called from it's Workbook_Open event procedure. It arrogantly announces:
"Compile Error: Can't find project or library"
But there it is, the missing procedure, right there in the code.xla module
that's all loaded and ready to go.
I know that I've pulled this off once before and it was so complicated a
series of events that I think I just fluked into the right combination but
for the life of me I cannot seem to duplicate the feat. I've tried opening
data.xls with and without macros enabled. With macros disabled I've tried
VB
Tools-References.. and selecting the box for 'code' that appears there. I
get an error 400 or something like that with no explanation whatsoever.
So I plead for a step by step cookbook recipe to wean data.xls off of
code.xls and hook it up with code.xla.
For extra credit a cogent explanation of just what the hell is going on
here
would be a boon. Virtually all of the documentation I've gleaned from a
plethora manuals and web sites really don't explain anything at all. They
all seem to think that a couple of deft pointings and clickings will do
the
job. Hah.
--
Terry
"I said I never had much use for one,
I never said I didn't know how to use one."
M. Quigley