+ Reply to Thread
Results 1 to 4 of 4

ADODB error 80040e37

  1. #1
    Registered User
    Join Date
    10-27-2011
    Location
    Portugal
    MS-Off Ver
    Excel 2010
    Posts
    13

    ADODB error 80040e37

    Hello,

    With Excel2010, I'm trying to open a Named Range (in the same workbook) with ADODB recordset.

    I get the following error when the try to open the recordset
    'Run-time error' -2147217865 (80040e37)': Automation error

    This is the code I'm using:

    Please Login or Register  to view this content.


    thanks in advance
    Márcio

  2. #2
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    2003, 2007, 2010, 2013
    Posts
    1,252

    Re: ADODB error 80040e37

    Hi,

    Even if we correct the code so that it works, you run into a problem because a bug means that querying an open workbook using this method causes a memory leak. Unless you were doing a quick test before trying it on a different, closed workbook, your best option is to use a different approach which does not use ADO.
    Hope that helps,

    Colin

    RAD Excel Blog

  3. #3
    Registered User
    Join Date
    10-27-2011
    Location
    Portugal
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: ADODB error 80040e37

    Hi,


    What would you suggest?
    I want to copy filtered data from a range to another location in the same workbook.


    And what is the problem in the code above?

  4. #4
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    2003, 2007, 2010, 2013
    Posts
    1,252

    Re: ADODB error 80040e37

    I want to copy filtered data from a range to another location in the same workbook.
    If you are using the autofilter then the Autofilter.Range.SpecialCells(xlCellTypeVisible) method will give you a reference to the visible cells within the range.

    Alternatively, the Advanced Filter has built-in functionality to copy the filtered results to a separate location so, based on the information on the thread, I would probably set up a criteria range and use the advanced filter.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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