Dynamics GP VBA [ Compile Error Sub Or Function Not Defined ]

Dynamics GP VBA [ Compile Error Sub Or Function Not Defined ]

This question is answered

HI,

We are facing a strange issue. We have customized Payable manual payment entry using VBA & Modifier. There is one button and behind it there is VBA Code to print the crystal report.

It works fine on all clients, but on one newly installed client ( Both XP & Windows 7) we are getting the compilation error after package deployment.

Compile Error:

"Sub Or Function Not Defined"

We did the following to resolve this 

  1. Using Customization Maintenance, export all the resources by using VBA as packages.
  2. Exit Microsoft Dynamics GP and rename, delete, or move all the *.VBA files.
  3. Start Microsoft Dynamics GP and use Customization Maintenance to import the .package files

It works fine but as soon as you log out Dynamics GP & login back it gives the same error.

Any Idea why this is happening ?

Thanks,

Waqas

Verified Answer
  • Hi,

    Have sorted the issue. when debugging by making all functions public ( from Private ) got the exact error and it was related to VBA6.dll missing issue.

    Now have updated the registry with correct VBE6.dll and it resolved the issue.

    Thanks,

    Waqas

All Replies
  • Have you tried stepping through the code to see where the error is coming up?

    Terry Blaser

    Dex and SQL Developer

    Straight Arrow Consulting, Inc.

    310-272-6240m

  • It is on the load  event for a custom VBA Form.

    The code is as follows

    Load TLREPORT

    TLREPORT.show

    Thanks,

    Waqas

  • Any support ???

  • Waqas,

    Can you please check if you see all customzed fields on new client?

    Thanks

    sandip

    Thanks Sandip Jadhav Cell : +1.210.440.9855 Dynamics GP Blog : http://sandipdjadhav.blogspot.com/
  • Hi Sandip,

    Yes it does show all fields.

    Thanks,

    Waqas

  • Hi,

    Have sorted the issue. when debugging by making all functions public ( from Private ) got the exact error and it was related to VBA6.dll missing issue.

    Now have updated the registry with correct VBE6.dll and it resolved the issue.

    Thanks,

    Waqas