+ Reply to Thread
Results 1 to 10 of 10

Excel ADO connection problem with Excel 2010 on Win11

  1. #1
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    Excel ADO connection problem with Excel 2010 on Win11

    I am using Excel 2010 on my new Windows-11.

    My problem is; the below simple ADO code returns an error saying that;

    "'Method Properties' of object '_Connection' failed"

    on line "adoCN.Properties("Data Source") = myFile"


    Before this line, no errors encountered so both of the adoCN and RS objects are created.

    Please Login or Register  to view this content.

    The file is located in C:\TestFolder and executed as an Admin and also as a standard user but, nothing changes...

    Also, none of the ADO related VBA codes are not working which were working on Excel 2010 / Windows-7

    I guess something is going wrong with Win11 but i am not sure.

    Is there anybody having a similar problem on Windows11 ?

    Note: The same question is also posted on Stack Overflow in the link given below;

    https://stackoverflow.com/questions/...nect-to-a-file
    Last edited by Haluk; 07-21-2023 at 03:29 AM.

  2. #2
    Forum Expert
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    1,386

    Re: Excel ADO connection problem with Excel 2010 on Win11

    You might try this

    https://learn.microsoft.com/en-us/of...nnection-error

  3. #3
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    Re: Excel ADO connection problem with Excel 2010 on Win11

    JEC, the link you provided seems to be related with MS Access connection problem but, will check it.

    Thx..

  4. #4
    Valued Forum Contributor
    Join Date
    02-06-2014
    Location
    N/A
    MS-Off Ver
    N/A
    Posts
    373

    Re: Excel ADO connection problem with Excel 2010 on Win11

    Quote Originally Posted by Haluk View Post
    I am using Excel 2010
    I found your problem

    Real answer, my suggestion: Confirm the purpose and syntax for adoCN.Properties("Data Source"). I'm not sure it's accomplishing what you think it is. Usually you pass the reference to the file in the connection string. Something like:

    Please Login or Register  to view this content.

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Excel ADO connection problem with Excel 2010 on Win11

    Haluk,

    see if this works,
    Please Login or Register  to view this content.

  6. #6
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    Re: Excel ADO connection problem with Excel 2010 on Win11

    @Poizhan, thanks for your message but I've to say that; the code was working without any problem with Excel 2010 on Win7 before.

    I am working with Excel and VBA applications for more then 25 years.

    The problem arised when i bought a new laptop with Win11 and installed my Excel 2010.

    Probably, there is a problem with ADO drivers...

    Except the mentioned ADO problem, everything seems to be working with my old Excel files on Win11.
    Last edited by Haluk; 07-21-2023 at 09:45 AM.

  7. #7
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    Re: Excel ADO connection problem with Excel 2010 on Win11

    @Jindon, thx for your message.

    I've tried the JET drivers before and got the same error as well. (I tried your code again but no hope... same error)

    Also, i tried to connect to a MDB file instead of an Excel file but i got same error...

    Btw, are you on Win11?
    Last edited by Haluk; 07-21-2023 at 02:40 AM.

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Excel ADO connection problem with Excel 2010 on Win11

    I've tested my code with xl2000 and Win11 and it works in both 365 and 2000 here.

    But doesn't work with 2000 when "Macro" or "xml" appeared after excel version.

  9. #9
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    Re: Excel ADO connection problem with Excel 2010 on Win11

    Hmmm.... thx a lot for the information Jindon.

  10. #10
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    Re: Excel ADO connection problem with Excel 2010 on Win11

    Breaking news;

    I uninstalled Office 2010 and installed again...... the original code in message #1 is now working as expected.

    Thank you all...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 11-13-2018, 02:41 AM
  2. Replies: 3
    Last Post: 08-25-2017, 09:48 AM
  3. Excel csv connection problem
    By shep6 in forum Excel General
    Replies: 0
    Last Post: 08-14-2015, 09:59 AM
  4. Database connection between Excel 2010 and PDF
    By drssray in forum Excel General
    Replies: 0
    Last Post: 03-14-2014, 12:07 PM
  5. Excel 2010 WebDav Connection to SharePoint
    By MHall in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-03-2014, 08:54 AM
  6. Excel 2010 - External data connection lost
    By Pettr in forum Excel General
    Replies: 0
    Last Post: 09-19-2013, 09:24 AM
  7. Replies: 0
    Last Post: 11-14-2012, 03:52 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1