none
Bug in VBA ScreenUpdating in MS Project 2013 and 2016 RRS feed

  • General discussion

  • Below a short (3-line) piece of VB code that turns off screen updating, applies the standard "Gantt Chart" view, then turns screen updating on again. When you run the code, the result is all task names and gantt chart bars disappear and only the dependencies remain in the Gantt chart.


    Sub screen_updating_problem()
         ScreenUpdating = False
        ViewApply "Gantt Chart"
        ScreenUpdating = True
    End Sub

    After further investigation, it turns out that ScreenUpdating = False does not actually turn screen updating off (not sure if this is a separate problem or part of the same problem). The identical piece of code works as expected with MS Project 2010, so it's a problem with MS Project 2013 and 2016, both Standard & Pro.


    Other people have confirmed they see the same thing. I reported it to Microsoft a year ago (I managed to got online with somebody, and they confirmed it's a problem), but it's still a problem. I can't believe this has been around for over 3 years now and hasn't been fixed.

    I'm hoping someone from Microsoft will see this, or to hear if anybody has found a workaround.


    Mark

    Friday, January 13, 2017 5:48 PM

All replies

  • I've never been able to get FreezeScreenUpdating to work properly in any version of MSP. I wound up sending WM_SETREDRAW, 0 messages to all of Project's windows to freeze them and then using the same function to unfreeze and redraw them later. You're out of luck if your code blows up while the screen is frozen. Project will be active but unresponsive.
    Friday, January 13, 2017 7:00 PM
  • Mark,

    Unfortunately there are many things that never get fixed, it all comes down to priorities. The best solution I find for these types of issues is some type of workaround.

    Personally I don't rely on screen updating for Project, I find it more useful for Excel. Since the majority of macros I write work with background processing (i.e. working directly on Project's objects independent of the current view), the current view may or may not actually end up being updated. However, if there is a lot of processing that changes fields in the current view, you might consider temporarily calling a view that is not affected (e.g. the code operates only on task objects so active a resource view).

    Hope this helps.

    John

    Friday, January 13, 2017 7:51 PM
  • I head from Microsoft that the problem has been fixed.

    Yeah!


    Thursday, February 9, 2017 6:57 PM
  • Fixed how? This has been a problem for over 10 years and four versions and they finally got around to fixing it? I'd be shocked. Pleasantly shocked, but shocked nonetheless. Do you have a link/reference?
    Thursday, February 9, 2017 8:31 PM
  • MSP 2007 & 2010 were fine. I saw the problem in 2013 and 2016.

    Thursday, February 9, 2017 9:04 PM
  • I forgot to add - they said it would be in the March update.

    Thursday, February 9, 2017 10:34 PM