Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax for creating an object 1

Status
Not open for further replies.

48Highlander

Technical User
Feb 8, 2004
119
CA
I am evaluating the IBiz Integrator for QuickBooks. THier documentation is very poor and it doesn't help that I don't know enough about VBA coding.

I have the following code:
Code:
    Dim cust As Customer
    Dim strConn As String
  strConn = "ApplicationName= """ & "my app" & """ CompanyFile= """ & "QB path and file name" & """"
    cust.QBConnectionMode = cmDontCare
    cust.QBConnectionString = strConn
    cust.CustomerName = "John Doe"
    cust.Add

When I run this code, I get error 91: Object variable not set. How should I be setting up the cust object in my code?

Bill J
 
Bill,

Try adding the following line of code:
Code:
    Dim cust As Customer
    Dim strConn As String
  strConn = "ApplicationName= """ & "my app" & """ CompanyFile= """ & "QB path and file name" & """"
    [COLOR=red]Set cust = New Customer[/color]
    cust.QBConnectionMode = cmDontCare
    cust.QBConnectionString = strConn
    cust.CustomerName = "John Doe"
    cust.Add

Regards,
Mike
 
Thank Mike. That fixed it. Unforunately not I get an unsupported QBXML error. The answer to that issue will have to come from the delelopers of the IBiz Integrator.

Bill J
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top