+ Reply to Thread
Results 1 to 6 of 6

run time error (ADODB.Connection)

  1. #1
    Forum Contributor
    Join Date
    02-20-2023
    Location
    thai
    MS-Off Ver
    2016
    Posts
    106

    run time error (ADODB.Connection)

    I use ADODB.Connection in vba.

    Now my code.

    Please Login or Register  to view this content.
    Please guide me for solve it.
    Thank you




    but show error as attached.
    Attached Images Attached Images
    Last edited by 6StringJazzer; 09-26-2023 at 10:52 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: run time error (ADODB.Connection)

    Data Source expects a full path name for a file. You are just providing a folder name. You will have move conn.Open inside the loop and open a new connection for each file.
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

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

    Re: run time error (ADODB.Connection)

    You can not set the connection to folder for Excel files.

  4. #4
    Forum Contributor
    Join Date
    02-20-2023
    Location
    thai
    MS-Off Ver
    2016
    Posts
    106

    Re: run time error (ADODB.Connection)

    Thank you Jeff,
    But now I have new error.

    Attachment 843965

    How to solve it?

    Thank you
    Attached Images Attached Images
    Last edited by fairyme; 09-26-2023 at 10:59 PM.

  5. #5
    Forum Contributor
    Join Date
    02-20-2023
    Location
    thai
    MS-Off Ver
    2016
    Posts
    106

    Re: run time error (ADODB.Connection)

    Please Login or Register  to view this content.
    I want to select from sheet AP or ap.(lower case = ap)
    But show error.

    Please guide me for solve it.
    Attached Images Attached Images

  6. #6
    Forum Contributor
    Join Date
    02-20-2023
    Location
    thai
    MS-Off Ver
    2016
    Posts
    106

    Re: run time error (ADODB.Connection)

    Please Login or Register  to view this content.
    I want to select from sheet AP or ap.(lower case = ap)
    But show error.

    Please guide me for solve it.

+ 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. Run time error '3706' Provider cannot be found. [ADODB connection]
    By miket11 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-07-2021, 10:02 AM
  2. Run time error -2147467259(80004005) for using ADODB.Connection
    By VBALearn12 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-05-2019, 05:57 AM
  3. SQL0905N error when trying to get data from DB2 using an ADODB connection
    By adygelber in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-13-2019, 03:39 AM
  4. [SOLVED] ERROR: ADODB Spreadsheet Connection
    By Logit in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-29-2016, 10:27 PM
  5. System Error in ADODB connection code
    By Jonsocks in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-08-2011, 12:33 PM
  6. Error with using adodb Connection and double quotes
    By JimCo in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 07-23-2010, 11:19 AM
  7. [SOLVED] compile error... ADODB connection
    By ina in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-18-2006, 12:45 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