web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

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

(0) ShareShare
ReportReport
Posted on by

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

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

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

  • Community Member Profile Picture
    on at

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

    The code is as follows

    Load TLREPORT

    TLREPORT.show

    Thanks,

    Waqas

  • Community Member Profile Picture
    on at

    Any support ???

  • sandipdjadhav Profile Picture
    18,306 on at

    Waqas,

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

    Thanks

    sandip

  • Community Member Profile Picture
    on at

    Hi Sandip,

    Yes it does show all fields.

    Thanks,

    Waqas

  • Verified answer
    Community Member Profile Picture
    on at

    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

  • Community Member Profile Picture
    on at

    Hey, show how I can do it.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
mtabor Profile Picture

mtabor 1

#2
Victoria Yudin Profile Picture

Victoria Yudin 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans