"ActiveX component can't create object" when calling QuickBooks SDK functions (1 Viewer)

buratti

Registered User.
Local time
Today, 14:56
Joined
Jul 8, 2009
Messages
234
"ActiveX component can't create object" when calling QuickBooks SDK functions

Hello,

I have an older database created with Access 2010 (32bit) that I haven't uses in a while. This DB had lots of VBA code used to communicate with Quickbooks using their SDK which information can be found here:

https://developer.intuit.com/app/developer/qbdesktop/docs/get-started/download-and-install-the-sdk

I have upgraded my Office version to 2013 (64bit) since the last time I opened/used this database. Obviously I had many other lines of code not specifically related to the QBSDK (some of which were set to run upon opening of the DB). The first time I opened this since running Office 2013 I immediately received code errors stating:

"The code n this project must be updated for use on 64-bit systems. Please review and update Declare statements and then mark them with PtrSafe attribute."

I went through each declare statement and added "PtrSafe" attribute then selected Debug - Compile to see if there ere any other errors.

for anything declared as "DOMDocument" it stated "User Defined type not defined".

I changed all "DOMDocument" declarations to "DOMDocument60" and fixed any other errors that were stated when compiling the code.

Now, whenever I call any function used to communicate with QuickBooks (that uses the SDK) I get an error stating "ActiveX component can't create object". I click Debug and it takes me to the following line:

Set Sessionmgr = New QBSessionManager

Sessionmgr is defined as follows:
Public Sessionmgr As New QBSessionManager

Granted I am not an advanced coder, and copied most of wha tI have from their sample code site found here:
https://developer-static.intuit.com/qbsdk-current/common/newosr/index.html

However, this all worked perfectly the last time I used it under Office/Access 2010.

Anyone have any suggestion as to what can cause this and how to resolve it?
 

buratti

Registered User.
Local time
Today, 14:56
Joined
Jul 8, 2009
Messages
234
Re: "ActiveX component can't create object" when calling QuickBooks SDK functions

OK, so i jumped the gun a little on this post as I think I found out at least "why" I am getting errors.

Viewing the following site, it seems like the QuickBooks SDK only supports 32 bit systems.

https://help.developer.intuit.com/s...intuit-developers-be-building-a-64bit-version

I don't know how this has any relation to an "ActiveX" error but I am assuming this is the root cause.

Also, when my database last worked, my OS was 64 bit, but I was running 32 bit version of Office.

So... I am changing my question to: Since I am on a 64 Bit OS and now 64 Bit version of Office/Access, Is there any way to run my database in a "32bit mode", or any other suggestion to get my previous code to start working again?

Thanks in advance
 

buratti

Registered User.
Local time
Today, 14:56
Joined
Jul 8, 2009
Messages
234
Re: "ActiveX component can't create object" when calling QuickBooks SDK functions

Never mind....

I installed only Access 2007 32bit along side of Office 2013 64 bit. Then just opened up a copy of my database pre 64bit modifications and then everything was working just as it was previously.

Against what is stated on several random sites about not being able to install different MS Office bit versions side-by-side, I was able to right off the bat without any issues as of yet.

I can open either Access 2007 or 2013. For this particular DB I have to open with Access 2007, but that's fine as long as it works!!!

Word, Outlook and Excel still open the 2013 version (as there isn't even a 2007 version installed)

I figured I'd just post my own solution in case anyone else is facing the same problem.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 13:56
Joined
Feb 28, 2001
Messages
27,218
Re: "ActiveX component can't create object" when calling QuickBooks SDK functions

The problem in many cases (not guaranteeing that it is YOUR case) is that MS did not convert all of their 32-bit libraries to 64-bit mode and thus some things either won't work or won't work right for a 64-bit environment.

Before you ask the obvious question, we don't know why they did that either.
 

Users who are viewing this thread

Top Bottom