Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Set cnn = New ADODB.Connection

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default Set cnn = New ADODB.Connection

Maybe, you should have a reference to the Microsoft ActiveX Data Object n.n
Library.

--
__________________________________
HTH

Bob

"burl_h" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default Set cnn = New ADODB.Connection

What are you connecting to ?

"burl_h" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Set cnn = New ADODB.Connection

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
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default Set cnn = New ADODB.Connection

That is a perennial problem, why many of us just use late-binding.

--
__________________________________
HTH

Bob

"burl_h" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ADODB Connection fi.or.jp.de Excel Worksheet Functions 0 September 9th 09 09:23 PM
ADODB.Connection Bogdan Excel Programming 7 July 16th 07 03:42 PM
ADODB.Connection Jez[_7_] Excel Programming 0 October 13th 06 12:02 PM
ADODB Connection Problem spardey Excel Programming 5 December 3rd 05 11:00 PM
ADODB Connection Problem alpder Excel Programming 3 November 4th 05 09:28 PM


All times are GMT +1. The time now is 03:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"