Set cnn = New ADODB.Connection

  • Thread starter Thread starter burl_h
  • Start date Start date
B

burl_h

I'm having issues with this line of code.

Currently it works fine in excel 2003. however after the file is used
in excel 2007 and saved in compatability mode, it no longer works in
excel 2003. Am I missing some object libaries?

thanks
burl_h
 
Maybe, you should have a reference to the Microsoft ActiveX Data Object n.n
Library.
 
Mike/Bob,

I narrowed the issue down to a missing libary. It appears that when
the file is saved with excel 2007 (in compatability mode) then opened
in excel 2003 it shows that the Microsoft Outlook 12.0 object libary
is missing. I changed this to object libary 11.0 and the macro runs
fine in excel 2003. After I save the file in excel 2003 then re-open
the file using excel 2007 the object libary changes back to 12.0, the
macro runs without issue.

So the problem appears to be how excel 2007 and 2003 assign the
microsoft outlook object libaries, one wants 12.0 the other wants
11.0.

How can I overcome this?

Thanks
burl_h
 
Back
Top