Showing posts with label VBA. Show all posts
Showing posts with label VBA. Show all posts

Saturday, July 2, 2011

"Unknown error 0 - 800AC351 occurred saving the project file" - Error & Solution

0 Comments
My last post discussed about an error message faced by users once GP2010 R2 upgrade was over. This post gives you a solution for that.

The following error message was faced by users when they log off from GP:










Initially I thought it was occurring only on "sa" login. But couple of users today reported the same error when they logged off from GP.

When I analyzed this further, I realized that users who have access to Field Service processes in GP alone were getting this error message. Those who do not have access never reported this issue at all.

That made me to think about next step in solving this. No one has reported this issue yet, thus leaving me in the lurch.

I finally found a solution for this menace.

SOLUTION:

1. I logged off all users from GP environment, as it is Terminal Server environment for us.
2. Launched GP and opened Visual Basic editor.
3. Opened Field Service VBA project.
4. Did some harmless edits (like adding some comments, etc.).
5. Opened the "References" wizard.
6. Unselected all references and selected it back.
7. Compiled the entire project to check whether I am getting any error message.
8. Saved VBA project.
9. Logged off from GP.

Surprisingly (but expectedly) the error message never appeared again.

Those who are looking for some solution for this menace, here it is for you.

VAIDY

Unknown error 0 - 800AC351 occurred saving the project file - Error Message

0 Comments
Has anyone faced this error message?










I recently found this error message after upgrading to GP2010 R2, though it doesn't have any impact towards other users' sessions and even the customizations.

This happens only for an "sa" login. Very strange error message.

UPDATE 1: This is happening for all users who have access to Field Service module. If you see the above message, the error is thrown by Field Service VBA project.


UPDATE 2: Issue is resolved. Please read my next post to know better about this message.

VAIDY

Tuesday, August 24, 2010

Solution to "File not found: VBA6.DLL" Error Message

4 Comments
The File Not Found: VBA6.DLL issue which I had explained in my previous post has got a solution.

Thanks to Japheth Nolt, who pointed me to this Partner Forum post.

The following are the steps to fix this issue, taken directly from Dynamics GP Partner Forum Post (Link To the Original Post: File Not Found: VBA6.dll):

----------
Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base: 

1. Export all customizations to a .package file.

2. Close Microsoft Dynamics GP.

3. Make a backup of the system registry.

4. Change the following key in the system registry:

KEY_CLASSES_ROOT\TypeLib\{000204EF-0000-0000-C000-000000000046}\4.0\9\win32

to have the path of this: C:\Program Files\Common Files\microsoft shared\VBA\VBA6\VBE6.dll

Note, if on a Windows 2008 Server R2 install the key was this: HKEY_CLASSES_ROOT\TypeLib\{000204EF-0000-0000-C000-000000000046}\4.1\9\win32

5. Delete all VBA files with a file size of 4KB.

6. Rename all VBA files with a file size greater than 4KB.

7. Start GP.

8. Open VBA editor.

9. Check the VBA reference to ensure the path is to the C:\Program Files\Common Files\microsoft shared\VBA\VBA6\VBE6.dll file.

10. Add a window and field to VBA and test the message box code.

11. Verify the message box works.

12. Import all customizations.

13. Verify more than one customization works.

Note, this has only been tested on an Office 32-bit installation. If you have an Office 64-bit installation, you will need to uninstall it and then install the 32-bit version. This will not affect Outlook user profiles.
----------

What I did is the following:

1. I removed all the VBA files from GP Folder in my 32 Bit machine.

2. I performed the steps listed above from #1 to #4 (modifying the registry entry).

3. I launched GP and opened the VBA Editor, to make sure that the Visual Basic for Applications Reference is pointing to the path C:\Program Files\Common Files\microsoft shared\VBA\VBA6\VBE6.DLL.

4. Closed GP. Relaunched it.

5. Imported the VBA Customizations that were exported from 64 Bit machine.

6. My customizations started working.

IMPORTANT NOTE: You must re-reference any 3rd Party plugin references after importing the VBA Packages, in case these 3rd Party plugins sit in Program Files (x86) folder in 64 Bit machine.

Hope this is helpful for people who face this issue.

VAIDY

Monday, August 23, 2010

Are you importing VBA Customizations from 64 Bit to 32 Bit? Beware

2 Comments
This one's quite baffling. The scenario is this:

1. I have my VBA Customizations on a 64 Bit Live Environment.
2. I wanted to setup a Dev Environment so that I can work on Enhancements and Additions. The Dev Environment is nothing but my laptop and it's quite obviously 32 Bit.
3. I had DBs restored from Live and GP installed with necessary addons on my laptop.
4. Imported Modifier/VBA Customizations from Live to my laptop. There we go with an error message, which I am yet to solve:

















And it took me to the VBA Editor. Since it said "VBA6.DLL is not found", I wanted to check whether all References are proper. And below is what I found:




















See the highlighted path and filename. It's completely different from what it has to be "VBA6.DLL".

Excellent and a pat on my back. Now why this is happening. I found the reason when I cross checked Live Environment VBA References:




















Alright, the issue is this:

1. On a 64 Bit Server, GP and VBA Files are installed on Program Files (x86) folder.
2. Whereas on a 32 Bit machine, GP and VBA Files are installed directly on Program Files folder.

That's the difference. Once you import and start GP it does work for the first time. Once you close GP and reopen it, it refers to (x86) folder. Since it's not found, it starts throwing this message.

The sad parts: Firstly, I won't be able to change the path back to Program Files folder manually by clicking on BROWSE in the References window. Secondly, I won't be able to remove the reference by unselecting it and then reattach the VBA6.DLL reference. It will always throw me an error message like this:














I am in a fix now. We may have some other ways to handle this. I am working on that. There may be a followup post which will explain the methods that can be used to fix this issue.

Meanwhile, if anyone has faced this issue, do share your ideas and how you fixed it. It would save me some time.

UPDATE - 1: The reason explained above is substantiated, when I did another test. I imported 64 Bit Server VBA Customizations onto another 64 Bit Environment, it works. I imported a 32 Bit Server VBA Customization onto another 32 Bit Environment, and it works.

UPDATE - 2: The reason that I had explained in this article, is only partial. There are more to this issue. My next article explains the solution and also contains a link to Dynamics GP Partner Forum post, which led to a fix. Read it here: Solution to "File Not Found: VZBA6.DLL" Error Message.

VAIDY

Friday, August 6, 2010

Currency Values Returned By VBA To A Report - David

0 Comments
Such a weird issue, but since it's said to be known, we can't do much about it. But David gives us an alternate option to tackle this.

Read it here: Currency values returned by VBA to a report are multiplied by 10 or 100.

Must read for Developers.

VAIDY

Wednesday, July 21, 2010

Display Extender Data for GL Trx Lines on GL Inquiry - David

0 Comments
This post is awesome. And quite a practical requirement nowadays. David takes us thru' the steps involved in writing a piece of code that does wonders for us.

Read it here: Display Extender Data for GL Trx Lines on GL Inquiry

VAIDY

Tuesday, July 13, 2010

Changing Dictionary Context when using Passthrough Sanscript - David

0 Comments
David has started a new series which will explain Passthrough Sanscript Coding, from simple to complex scenarios.

First post here: Changing Dictionary Context when using Passthrough Dexterity sanScript Part 1


Watch out for some awesome posts from now on.


VAIDY

Wednesday, June 9, 2010

VBA - Adding Extender Windows to GL Transaction Entry Lines : David Musgrave

0 Comments
This is another code wonder from David Musgrave.

A Hybrid approach (VBA & Dex) which solved a GP - Extender issue. Read it here: VBA - Adding Extender Windows to GL Transaction Entry Lines.

A Must Read for GP Developers.

VAIDY

Thursday, April 15, 2010

GP Login Form - Caps Lock Reminder - UPDATE

0 Comments
This post is an update to my previous article, CapsLock Reminder for GP Login.

In my previous article, I had shared a package which would remind you of Caps Lock being switched on.

This warning will be shown as soon as you either launch GP or try to change the User after your first login.

I thought I would tweak it so that it would show this warning when you enter Password Field. And that makes more sense than showing it right after opening the GP Login form.

So please find that updated package here: CapsLockReminder-Update.package.


VAIDY

Friday, March 5, 2010

Caps Lock Reminder for GP Login

1 Comments
How many times have you entered your GP Password with CAPSLOCK on and got a Login Error Message?

Well I do, most times. I decided to write a code which would remind me of this at least once, like any other application.

Thought I would share that with all who need it. This particular code will display a message box like below when you launch GP with CAPSLOCK key ON.

















This message will also be shown when you try to change the User after logged on to GP thru' different User Credential.

Kindly Note:

1. This message is displayed only once. You must hear what it says. If not, the message is of no use. :-)

2. This code is written on Microsoft Dynamics GP 10.0 SP4. I have not tested this on other Major as well as Minor versions.

Find your free package here: CapsLock Login Message Package File.

VAIDY

Friday, February 5, 2010

Editing VBA Code With Only Customization Site License - In Touch With Dynamics (GP)

0 Comments
Another informative and hidden tip from In Touch With Dynamics (GP) blog.

I myself got enlighten after reading this article: How to edit VBA when client only has Customization Site License.

I had never thought this was possible and it is.

Must read for all Dex/Modifier/VBA Developers out there.

VAIDY

Blog has moved, searching new blog...