View Single Post
  #15   Report Post  
Posted to microsoft.public.excel.programming
Peter T[_7_] Peter T[_7_] is offline
external usenet poster
 
Posts: 162
Default Can't find project or library


"hbj" wrote in message
On Tuesday, April 5, 2016 at 5:58:57 PM UTC+3, Peter T wrote:
"Peter T" wrote in message
"
Peter, I use Windows 7 Enterprise 32-bit and Office 2007 Pro. At the
moment VBA requires (MISSING) "Microsoft ActiveX data Objects 6.1"
located
in C:\Program Files (x86)\Common Files\System\ado. (msado15.dll) One
version of msado15.dll locates in "Program Files\..." but is that a
correct dll? Which version should I use and where can I find teh correct
version?
"

It might be 6.1, though msado15.dll is also 6.0 and 2.8 as there's
nothing
new in terms of public methods. Right click it, Properties, Details and
look at File version and Product version. Try removing the MISSING
reference, then browse to your msado15.dll and see if you can add it.


If you can't, simplest might be just to reinstall 6.1
https://support.microsoft.com/en-us/kb/2640696 x86 for Win7

You may need to remove and re-add the reference

Peter T


"
SOLVED!
Thank you!

I found 2 files msado15.dll, one created 2009 and one 2010, neither of those
accepted. I simply changed to ado28 which was listed in available reference
list.
"

Sure, the 2.8 would most likely work or even 2.5, but why not install the
6.1 (via the link above)

"What I'm still wondering, how on earth VBA engine complains about ADO in a
statement with common command TRIM(....)? "

Whenever there are any MISSING references String and DateTime functions are
particularly likely to fail unless fully qualified to the respective
library, eg
VBA.Strings.Trim()

Keep in mind if your file is ever loaded on a system without the 2.8 it will
fail again. Late Binding would usually avoid these problems.

Peter T