Support 64-bit Excel?

Jul 24, 2012 at 5:02 AM

I'm using Office 64bit and very happy when seeing @Govert say: support 64 bit Excel.

But after tried use replacement sqlite.dll 64 bit , and update VBA declares,

`...Declare Function...` change to `...Declare PtrSafe Function...`

I still have error with loading library:

SQLite3Initialize Error Loading C:\Users\davuz\Downloads\SQLiteForExcel-0.7\Distribution\SQLite3_StdCall.dll: 193 Error Initializing SQLite. Error: 193

How to config to run with Excel 64bit? Thank you very much!

P/s: I posted this question on too. 

Jul 24, 2012 at 1:23 PM


I haven't actually figured out the 64-bit stuff yet - I just noted that there is now a pre-compiled SQLite for 64-bits, which helps us a lot.

First thing to note is that for the 64-bit case you don't need the SQLite3_StdCall.dll at all. It is just required for 32-bit case. So all the .dll references in the VBA file must directly refer to SQLite3.dll.

Next, I think you are on the right track with the PtrSafe changed. But I am not sure exactly how that works. One would have to figure out which of the 'Long' arguments are actually pointers.

I'll try to have a look when I get a chance. Please write back if you make some progress too.


Jul 24, 2012 at 9:06 PM

Support for 64-bit Excel was added in Version 0.8

Jul 25, 2012 at 2:43 AM

Thank you very much! I was tested on 64bit Excel. Perfect!!!

However, I don't understand why 32bit need  `SQLite3_StdCall` wrapper while 64bit doesn't? I just wonder a bit about that.

Jul 25, 2012 at 7:27 AM
Edited Jul 25, 2012 at 7:28 AM

Under 32-bit x86 there are different calling conventions. VB supports only the StdCall calling convention, but the SQLite libraries are compiled with the Cdecl calling convention. The SQLite_StdCall wrapper translates these.

Under 64-bit x64 there is only one calling convention, and this is not an issue.