Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Error delaring ACCPACXAPILib.xapiView

Error delaring ACCPACXAPILib.xapiView

Error delaring ACCPACXAPILib.xapiView


Below is the code I am using to open a AccPac (5.1 A) session.

I amable to open the session, but as soon as I try to declare the view (last line), it crashes with the error (also below).

I am using an unregistered version of AccPac (30 day Trial).  Could that be the reason for the error?

If I try to register the 'A4wcom.dll' through component services, a number of the methods inside the Dll are not registerd.  One of those that is not registered is 'xapiView' method. The 'xapiSession' method does get registered.

Dim session As New ACCPACXAPILib.xapiSession
session.Open("ADMIN", "ADMIN", "RMICON", Now.Today, 0)
Dim ARINVOICE3batch As New ACCPACXAPILib.xapiView

An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in aplaccpac.dll

Additional information: COM object with CLSID {25E6B455-8B9D-11D1-B5A9-0060083B07C8} is either not valid or not registered.

RE: Error delaring ACCPACXAPILib.xapiView

An unreguistered version of ACCPAC just means that you haven't registered with ACCPAC themselves. All installed components will be registered with your OS.

If you don't think that your a4wcomm.dll is registered properly you can manually register it with 'regsvr32'. Click start-run and enter (make sure the path given is correct for your computer),

  regsvr32 "C:\Program Files\Accpac\Runtime\a4wcomm.dll"

I always use late binding when creating the views. Early binding does not give all the required information, such as which view to open. Here is the syntax that I would use,

   Dim ARINVOICE3batch As ACCPACXAPILib.xapiView
  Set ARINVOICE3batch = session.OpenView("AR0031", "AR")

Take Care,


"Show me someone with both feet on the ground and I will show you someone who can't put their pants on."

RE: Error delaring ACCPACXAPILib.xapiView

Thanks.  That works .

RE: Error delaring ACCPACXAPILib.xapiView

Your welcome.

Take Care,


"Show me someone with both feet on the ground and I will show you someone who can't put their pants on."

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close