Link to home
Start Free TrialLog in
Avatar of Software Engineer
Software Engineer

asked on

Why Did VBA Temporarily Stop Working?

Hello:

In our Microsoft Dynamics GP 2013 SP2 environment, we created VBA code on an inquiry window.  We tested the code thoroughly beforehand, within a test environment, and the code had been working perfectly for weeks.

Then, about two weeks ago, a GP end user received VBA error messages on top of the fact that the code stopped working.

I had to copy the code from the Visual Basic Editor, remove the window from Visual Basic, re-add the window and its fields to Visual Basic, and paste the code into the Visual Basic Editor.  Afterward, the errors went away and the code worked again.

Why did these steps have to be taken?

By the way, I'm an Administrator on the Terminal Servers and the VBA code had stopped working for me as well as for the end users.

Thanks!

John
Avatar of Norie
Norie

John

What were the error messages?

Were they specific to the code itself or more generic?
Avatar of Software Engineer

ASKER

First, some of the fields in the window that were set to be invisible were visible.

Secondly, the main error message was the following:

Run-time error '1003':

Unsafe Operation.  This operation could compromise the integrity of the application.


This error message appears in a "Microsoft Visual Basic" window.  The buttons that appear are labeled "End", "Debug", and "Help".
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks, Ryan!  I'm not really changing any fields that meet the criteria discussed in that article.

Again, thank you, for chiming in.

John