Posts by mediaeval

    Re: ADODB connection error when process is called from 64-bit Excel


    I've disovered the reason why i've been getting an error with the 64-bit code, and it's very subtle. Here's the 32-bit code:


    Code
    cn.Open "Driver={Microsoft Text Driver (*.txt; *.csv)};" & "Dbq=" & sFolder & ";" & "Extensions=asc,csv,tab,txt;"


    Here's the 64-bit code:

    Code
    cn.Open "Driver=Microsoft Access Text Driver (*.txt, *.csv); & "Dbq=" sFolder & ";" & "Extensions=asc,csv,tab,txt;"


    Aside from the word Access in the 64-bit version, there is one other difference...can you spot it?


    OK...it is that, in the 64-bit version, the text in the brackets, *.txt and *.csv are now separated by a comma, and not by a semi-colon, as in the 32-bit version. Agggghhhhhhh!

    Re: ADODB connection error when process is called from 64-bit Excel


    Hi Rory


    In the 64-bit Excel 2013, I click on the Data tab on the ribbon, and in the 'Get External Data' group is a 'From Text' option. Is this what you mean...? Clicking on this brings up the 'Import Text File' dialog, and when i choose a file, it brings me into the old-style Text Import Wizard that has (I think) been in every version of Exel since Excel 98, or perhaps earlier.

    I am testing a subroutine against both 32-bit Excel 2010 and 64-bit Excel 2013. I have a cn.Open statement as follows that works for 32-bit Excel 2010, but that does not work for 64-bit Excel 2013.


    Code
    cn.Open "Driver={Microsoft Text Driver (*.txt; *.csv)};" & "Dbq=" & sFolder & ";" & "Extensions=asc,csv,tab,txt;"


    When called from 64-bit Excel, it returns the error, “[ODBC Driver Manager] Data source name not found and no default driver specified”


    I’ve googled this extensively and cannot find the correct code to use for 64-bit Excel 2013. Can anyone help?

    I have a macro which is very labour intensive, and takes about 3 days to run. It’s in Excel 2003 and runs on a PC running 32-bit Windows XP. The PC has a 3Ghz Dual Core Processor with 4GB of RAM. The PC was recently upgraded from 2GB of RAM but I haven’t seen much of an improvement in performance.

    My question is this: if I were to run this macro on a PC running 64-bit Windows XP (bearing in mind that Excel 2003 is a 32-bit application), would it make a noticeable difference? Or would I only see a difference on a PC running 64-bit Windows XP if the version of Excel were also 64-bit (which would have to be Excel 2010, since Excel 2007 and Excel 2003 are 32-bit applications).