In Touch with Dynamics GP

This blog is intended to be a useful resource for Microsoft Dynamics GP users and professionals in the UK and the wider Microsoft Dynamics GP community as a whole.

Friday, 5 February 2010

How to edit VBA when the client only has customization site licence

Well you learn something new every day and today our tame Dex developer is sat next to me in the office (some say he writes code in his sleep, others say he has dexterity tattooed on his heart, all we know is, he is called Jon) so picking up all sorts of things.

This one however is really simple and very useful. Often we will develop modifications for clients on our systems then import these using customization maintenance onto the client systems. This means that the client does not need to have modifier etc, just the customization site licence to run the mods.

However if the VBA on the mods need editing you need to export it back out onto your system to do this then re import it.

Well here is a simple tip. Export the modification out into a package file. Then open the package file up with notepad.

In the VBA code add in the word STOP. This command will tell the VBA to debug.

Re import the package file then open the screen or run the report. The STOP in the VBA code will then open the VBA window and allow you to edit the VBA.

Next handy tip DONT CLOSE THE VBA WINDOW if you do you will have to go through all this again to open the window so leave it open till you have finished and remember to remove the STOP from the code.

1 comment:

  1. You can also add "Bad code" to a field in the system the custoemr does not use or create a button on a modified screen only the admin has access to. I have seen this done int he past where the "Bad Code" would open the debugger when you changed focus from a certian field in a screen/module the customer did not use.

    Thought this may help as well. it saves the export/import process.