"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?
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?