Programatic Reference to Libraries
Thanks! That's the clearest description of early and late binding that I've
seen.
After posting the question, I poked around and came up with a hybrid late /
early binding solution that should work on the machines in question - and I
don't have to develop with early binding and muck with the code before I
release it so that late binding works.
If the reference to excel is busted (as seen in the .isbroken property), I
late bind an object to whatever excel is installed on the PC, look at the
..path property of the late bound object, build a likely file name for Excel
including the path, and use .adddFromFile to add the reference. Once it's
added, I can check versions & such for some rassurance that it's going to
work.
If all that fails to work, then it's no more busted than it was to start
with - and I've upheld the "First, do no harm." principal.
I suspect if I understood GUID's better, I could go down the .addFromGUID
path. But that, I think, is for another day.
Ed
|