Open Forum

  • 1.  Cannot save VBA project even with exclusive access | 2-min video demo

    Posted Apr 12, 2021 12:37 PM
    Cannot save the VBA project in GP. I'm remoted into our server, running as administrator, logged in as sa, even cleared the temp/session tables.

    Error dialog = The VBA project cannot be saved because there are other users in the system or the file is read-only


    VBA > Tools > References, 'Microsoft Dynamics GP' is unchecked.

    Cannot check and then save project though. Uncertain if that matters though.


    Seen this previously but the fix is elusive. Its fingertip close .. I can feel it. What am I missing?


    Screencast recording [1:48]


    #Admin
    #Security
    #GP2018and2018R2
    ​​​​​​​

    ------------------------------
    Brad Smith
    SE Retail
    Fountain Inn SC
    ------------------------------
    Academy - Online Interactive Learning from Experts


  • 2.  RE: Cannot save VBA project even with exclusive access | 2-min video demo

    SILVER CONTRIBUTOR
    Posted Apr 13, 2021 08:32 AM
    Which server OS are you running GP on?  I have recently found VBA mods are not compatible with Windows Server 2019 and need to migrate to Visual Studio Tools

    ------------------------------
    Donny Kensmoe
    Senior Consultant
    Wipfli
    Green Bay WI
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 3.  RE: Cannot save VBA project even with exclusive access | 2-min video demo

    GOLD CONTRIBUTOR
    Posted Apr 13, 2021 08:53 AM
    Go into Task manager and see if there is another Microsoft Dynamics GP process besides your own running that may be locking the VBA file.  If so, End Task that process and you should be able to save it.

    ------------------------------
    Greg Wahl
    IT Applications Supervisor
    Owensboro Municipal Utilities
    Owensboro KY
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 4.  RE: Cannot save VBA project even with exclusive access | 2-min video demo

    Posted Apr 14, 2021 03:35 PM
    We're running SQL 2013 @Donny Kensmoe. This is adding GP window code. I've done this previously, and had this same issue, all while on this version. I'll keep that Studio requirement in mind though. Thanks

    I did not check processes and will try that this weekend when everyone's out @Greg Wahl. Sincerely appreciate your advice.​

    ------------------------------
    Brad Smith
    SE Retail
    Fountain Inn SC
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 5.  RE: Cannot save VBA project even with exclusive access | 2-min video demo

    TOP CONTRIBUTOR
    Posted Apr 15, 2021 06:17 PM
    Hi Brad,

    Here are two things to try:

    1. In windows explorer, browse to the GP folders (C:\Program Files (x86)\Microsoft Dynamics\GP***) and the different sub folders (Data, AddIns...).  I've had cases where even though I'm logged into the server as a domain admin, I still get the "You don't have permissions to be in the folder, you are not worthy..." or something like that.  Hit Continue and you will be "can then pass".  Then run GP and try to save the VBA.  It might work at this point.
    2. Check for files in use.  Right click on the windows logo and select "Computer Management".  In the System Tools tree, open "Shared Folders" and then click on the "Open Files".  From a command prompt, you can also enter   openfiles /query   (If it's configured).   Both of these methods can show you if someone has a file open.

    Good Luck!

    ------------------------------
    John Arnold
    Senior Software Engineer
    US Digital
    Vancouver WA
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 6.  RE: Cannot save VBA project even with exclusive access | 2-min video demo

    GPUG ALL STAR
    Posted Apr 16, 2021 10:55 AM
    Edited by Beat Bucher Apr 16, 2021 10:57 AM
    Hi Brad,
    I'm not sure you need to add the "Dynamics GP library" in the VBA reference library.. I don't recall having done that for many clients I wrote VBA code.. it just works.
    see here:
    https://www.fmtconsultants.com/enhancing-dynamics-gp-vba-customization/
    https://www.ktlsolutions.com/how-to-modify-gp-forms-using-gp-modifier-and-vba/
    https://qfactorconsulting.wordpress.com/2009/05/12/modifier-wvba-an-example/

    BTW, if you're interested, I've the original course material for the training on Modifier & VBA by Microsoft
    ------------------------------
    Beat Bucher
    Business Analyst, Dynamics GP SME
    Montreal QC/Canada
    @GP_Beat http://www.gp-geek.com
    Montreal QC GPUG Chapter Leader
    MBS MVP (2015-2018)
    All-Star 2013
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 7.  RE: Cannot save VBA project even with exclusive access | 2-min video demo

    GPUG ALL STAR
    Posted Apr 16, 2021 11:29 AM
    Edited by Beat Bucher Apr 16, 2021 11:30 AM
    Brad,
    From my training documentation, I found this in Chap. 5:

    Though nowhere does it explicitly tell you to add the Dynamics GP library in the references form in VBA..

    ------------------------------
    Beat Bucher
    Business Analyst, Dynamics GP SME
    Montreal QC/Canada
    @GP_Beat http://www.gp-geek.com
    Montreal QC GPUG Chapter Leader
    MBS MVP (2015-2018)
    All-Star 2013
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 8.  RE: Cannot save VBA project even with exclusive access | 2-min video demo

    Posted Apr 26, 2021 12:23 PM
    WooHoo! I successfully edited the VBA project.

    Yet another soul crushing repetitive data entry task has been automated. My users are jubilant.


    This time there were no issues. What was different? Might be Jupiter ascending in Sagittarius or our system gremlins were asleep at the time ;-)


    However, if there were issues I was armed with ample resources thanks to @Beat Bucher, @John Arnold, @Greg Wahl, and @Donny Kensmoe.​​​​

    Thank you for sharing your time and talent helping me succeed.

    ------------------------------
    Brad Smith
    SE Retail
    Fountain Inn SC
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 9.  RE: Cannot save VBA project even with exclusive access | 2-min video demo

    GPUG ALL STAR
    Posted Apr 27, 2021 01:03 AM
    @Brad Smith

    I have been watching this thread to see how you go and I am glad you have it sorted now.

    However, I do want to point out that VBA is "End of Life" and you should be looking for alternatives.

    Have a read of the following article:

    https://winthropdc.wordpress.com/2019/08/12/gppt-replacing-vba-with-gp-power-tools-developer-tools/

    Regards

    David​

    ------------------------------
    David Musgrave MVP, GPUG All-Star

    Managing Director
    Winthrop Development Consultants

    Perth, Western Australia

    http://www.winthropdc.com
    ------------------------------

    Academy - Online Interactive Learning from Experts


If you've found this thread useful, dive deeper into User Group community content by role