none
Userforms Not Saving and Disappearing

    Pertanyaan

  • Hi All - apologies for the length.

    Project 2010 (14.0.6023.1000) Standard SP1 MSO (14.0.6129.5000), running in Windows XP Professional SP3.

    I have been having problems with UserForms in my global file - occassionally disappearing or becoming otherwise inaccessible ("File not found" errors and "Automation Errors"). I initially thought I had some sort of corruption in the global file itself, so exported everything and rebult the file from scratch multiple times, but the errors kept appearing intermittently.

    While most of the behaviour is intermittent, and therefore can't be reliably reproduced, I've isolated some reproduction steps which cause issues to recur - and this happens on a blank global file, with nothing in it.

    So far I've tried:

    • Deleting the global file, forcing MSP to create a blank one
    • Deleting all Ribbon/Quick Access customisations (wasn't hopeful on that one, but wanted to rule it out)
    • Repairing my installation of MS Project and restarting the workstation

    But all to no avail.

    The following steps are reproduce the issue 100% on my workstation - I'd be grateful if anyone else could also reproduce:

    Issue A - User Form Changes not Persisting

    1. Delete the existing global file from [Profile]\Application Data\Microsoft\MS Project\14\1033\Global.MPT
    2. Open MS Project
    3. Open the VB Editor (View > Macros > Visual Basic)
    4. Right click on ProjectGlobal (Global.MPT) and select Insert > Userform
    5. Close the userform that just appeared (UserForm1)
    6. Reopen the userform and make a change (i.e. change the caption to "UserForm1234")
    7. Click the Save button on the VBE toolbar
    8. Close and reopen the userform

      RESULT: The change made in step 6 does not persist. It has reverted back to its original state.

    Issue B - '' could not be loaded
    Continuing on from the scenario above:

    1. Right click on ProjectGlobal (Global.MPT) and select Insert > Userform
    2. Close the userform that just appeared (UserForm2), and the form behind (UserForm1)
    3. Reopen the userform (UserForm2)
    4. Change the form name, e.g. from "UserForm2" to "UserForm2345"
    5. Click the Save button on the toolbar
    6. Close and reopen the userform

      RESULT: Error message displayed - '' could not be be loaded.
      The form now can't be opened or exported

    Issue C - File not found
    Continuing on from the scenario above:

    1. Right click on ProjectGlobal (Global.MPT) and select Insert > Userform
    2. Click the Save button on the VBE toolbar
    3. Close the userform that just appeared
    4. Reopen the userform (UserForm2)
    5. Shorten the form caption from "UserForm2" to "UserForm2468"
    6. Click the Save button on the toolbar
    7. Close and reopen the UserForm2

      RESULT:
      Error message displayed - File not Found

    Issue D - Application Crash without Error, Corrupting Global
    Continuing on from the scenario above:

    1. Open UserForm2345
    2. Open UserForm2

      RESULT: The MSP and VBE applications close immediately without giving an error
    3. Reopen MS Project
    4. Reopen the Visual Basic Editor

      RESULT: Error message stating Errors occurred during load.


      The ProjectGlobal is now named
      with the full path to the Global, and contains none of the forms created in the previous steps:
    Senin, 21 Januari 2013 17.19

Semua Balasan

  • Andrew,

    I don't know if this will help but Project 2010 has problems with userforms. When I had userform problems, Rod Gill pointed me to the following hotfix:

    http://support.microsoft.com/kb/2596585 

    You might want to give it a try.

    John

    Senin, 21 Januari 2013 20.14
  • Thanks John - I've got a few bureaucratic hoops to jump through to get that installed in this environment, so could take a couple of days, but I'll feedback my findings once I get it installed.

    Cheers,
    Andrew

    Selasa, 22 Januari 2013 10.10
  • To speed things up on this, I dusted off my personal laptop to test this. The results were a bit mixed:

    On the plus side, I found I could recreate the issue on the laptop - Project 2010 32 bit Professional (14.0.6023.1000)  SP1 MSO (14.0.6129.5000), running on Windows 7 64 bit SP1. As it's a standalone laptop that's never been near the company network, that at least shows that the issue is reproducible in a different environment.

    However, on the downside, downloading the hotfix and attempting to install, I get a message that the update has already been applied, and sure enough, the hotfix contains VBE7.DLL v7.0.16.25, but I'm already up to v7.0.16.27 as a result of security update KB2598243, so looks as though hotfix KB2596585 has been superseded.

    Found another forum post dating back to 2011 which describes similar issues with Project. Rod Gill responded at the time saying there were issues with VBE7 back then, which the Visual Studio team were working on. At the time, he said he was having to do substantial development in MSP 2007, only importing to 2010 for final test and roll-out - I'd have hoped that we'd moved on since then in the last 15 months.

    He also said: "UserForms are the main culprit, so if your code uses a UserForm, it pays to exit project after running it then re-open Project afterwards." That sounds painful - our whole MSP/ERP integration solution relies on forms, and I can't tell users that they need to save/close down project after every ERP related action. Again, hopefully we've moved on since then.

    A halfbaked theory I've got is that the behaviours described in issues A to D above only present themselves in production if an unhandled error occurs, presenting a VBA error message to the end user. I assume such errors use VBE7.dll, whereas if you've got nice error handling in place, VBE7.dll isn't touched. I'm usually pretty good at ensuring I've got error handles on the code, but the ERP code I've inherited isn't so tight, so maybe if I go through that code I can at least reduce the occurence of these issues for end users. I'll test this theory more tomorrow

    As for doing development, I've found that if you never click the save button in VBE - simply close VBE, and then project, the changes then persist. I've been through the scenarios above, and if I ignore all the steps where it tells me to click Save, they all behave normally. It's completely counter intuitive not clicking save, but it may give me a way forward.

    Been a frustrating few days looking at this issue - thanks for reading, and apologies for whinging.

    Selasa, 22 Januari 2013 21.16
  • Andrew,

    This is a recent thread so I'll chip in. I'm having the same issues as you've documented. I've posted a similar question to see if there is any new news on this (see http://social.technet.microsoft.com/Forums/en-US/projectprofessional2010general/thread/dcb6c873-d2d8-45f3-990d-94068b17e4f5)

    Specifically, in regards to your theory about un-handled errors (from your Tuesday, January 22, 2013 9:16 PM post) - I too have been down that path and I concluded it could be one of the causes, but it probably isn't the only cause. For example, once your "Issue A" occurs in the forms designer, it's all over, rover. B, C and D will occur - not a matter of if, but when. Or I have even gone to the extent of exporting everything from VBA, repaired Microsoft Project using the installer, deleted global.mpt, deleted the registry key, rebooted Windows, imported and rebuilt my application from an empty file, and the first time I open the new file, issue D occurs.

    Sorry I  haven't move the solution forward, but that's my two cents (or two pence in your case).

    Regards, 

    Paul

    Selasa, 05 Februari 2013 16.49
  • Thanks for the feedback Paul - reassuring to know I'm not going mad.

    I'm trying to get this raised with Microsoft through my company's support agreement, but its taking time. I'll update this if I learn anything more.

    Selasa, 05 Februari 2013 17.04
  • Hi Andrew,

    No you're not going crazy. I had this issue back in December, thought I'd licked it, and it returned with a vengeance last week when I added a new userform.

    I've downloaded the hotfix from KB2596585 and encountered the same problem you did. 

    Back to the drawing board ...

    Paul

    Selasa, 05 Februari 2013 17.30
  • Andrew,

    Rod responded to my other post and clarified that the hot fix in KB2596585 does fix the problem. I am in the same situation as you (with vbe7.dll at 7.0.16.27 but the problem is not fixed); but you would think it was fixed if the update was cumulative. Haven't investigated as to why. Rod's statement is also correct in that you have to exit after every save. The kb article states that if you save twice the problem occurs. 

    Paul

    Rabu, 06 Februari 2013 15.41
  • Paul,

    Microsoft also states in the disclaimer for hotfixes, which make up cumulative updates, that they are not fully tested and should only be installed if the user is experiencing the specific problem(s) fixed by the hotfix. Maybe that's why the cumulative update didn't resolve the issue but applying the hotfix by itself does?

    Just a thought.

    John

    Rabu, 06 Februari 2013 16.11
  • Hi John

    That sounds reasonable. I can try that out when I get some time. (Loose translation = weekend).

    Cheers

    Paul

    Rabu, 06 Februari 2013 17.24
  • Maybe we need to rollback the cumulative updates until we can apply the hotfix (i.e. working around the message that it has already been applied), then once the hotfix is applied reapply the cumulative updates that we uninstalled? I too shall give it a go and report back, but probably won't be until next week now. Thanks, Andrew
    Kamis, 07 Februari 2013 09.28
  • I've now tried this and afraid it hasn't been successful.

    I tried rolling back updates until it would allow me to apply the hotfix, but that didn't work, as it continually said the update had already been installed.

    So I took a different approach - uninstalled Project then did a fresh install of Project Professional 2010 SP1. Before I did anything, I applied the hotfix, and it installed OK. However, stepping through the reproduction steps in issues A to D above I got the exact same results.

    Just to rule it out, I ran Windows Update and applied the latest updates, taking me back to where I was before I did the uninstall, and again the reproduction steps still produce the same problems described above.

    Scratching my head on this one.

    Senin, 18 Februari 2013 20.57
  • I was able to roll back the updates and apply the hotfix. However, I found the hotfix doesn't seem to fix the problem. 

    So, different paths, same result :(

    Senin, 18 Februari 2013 22.56
  • An update 5 months on - I've got nowhere trying to raise this with Microsoft, however, I've learnt to live with the issue with a workaround.

    Th key is to never, ever click the Save button in the Visual Basic Editor when you have been editing forms. This was a hard habit to break.

    When I'm working with the code (but not editing the forms), if I forget and accidentally click the Save I can get away with it by closing down VBE and MS Project (thereby saving the global file), and reopening, quickly checking that all the forms are still accessible. I've found its usually OK in these circumstance.

    If, however, I accidentally click Save when I've been editing forms, then I've lost the changes to the forms I've made. I need to revert to a back-up copy of the global file (and I've got good at keeping regular back-ups) and redo the changes. I've learnt this the hard way having lost work lots of times, and no doubt I'll still forget in future.

    Sorry I've nothing better to report, but wanted to keep this thread up-to-date with my current position.

    • Disarankan sebagai Jawaban oleh Paul Wischow Selasa, 01 November 2016 12.50
    Selasa, 09 Juli 2013 10.09
  • This problem still exists in Microsoft Project 2010, but Andrew's answer provides an excellent workaround.

    The downside: you must make your forms changes in a separate session from code changes.  Close that session without saving Global.MPT.

    A minor inconvenience, once you know how it works.

    Selasa, 01 November 2016 12.53
  • Did this issue ever get resolved?  I am using MSP 2007 (don't laugh!) and I have the same issue....only recently started....
    Rabu, 13 Juni 2018 08.06