PDA

View Full Version : Excel not picking libraries from where it is instructed to pick from



sameershr
03-28-2012, 05:49 AM
HI All,

I have an Excel form having a macro code. The code is invoking a SOAP based web service & is populating cell values in the excel.
The form works fine with Win XP + Office 2003 but when I try running it on XP + Office 2010, it throws an error ‘Can’t find project or library’.
I debugged it & found that it is not finding the MSSOAP30.dll file which it is referencing (Can be seen in Tools refereces in VB editor window).
I changed reference value there to the correct location & the problem was solved for that form.

But the problem re-appears when I open the form next time. Excel does not pick the dll from where it was instructed to, when I opened it earlier.
This problem doesn’t happen on Win7 + office10 i.e. once changed the location of a dll, vba will pick that up from the same location from then on.

Is there any way to change this behavior, so that excel/VBA will pick up the particular dll, where it is instructed to pick from, in all the successive sessions?

Thanks,
Sameer

Kenneth Hobs
03-28-2012, 08:09 AM
Welcome to the forum!

I can't imagine that Excel would not find it again once set in the current environment. It is not uncommon to not find it the first time when you change environments as Windows changes system folders and those kinds of DLL's are not standard installs anyway.

You might find these posts on Soap interesting.

http://www.vbaexpress.com/forum/showthread.php?p=252560

http://www.vbaexpress.com/forum/showthread.php?t=34354