none
VBA: How to manage duplicate/ rename views (Project Server 2003) RRS feed

  • Question

  • I have written a VBA maintenance script to open and process all schedules in the database.  However intermittently the FileOpen method results in a pop-up to address either a duplicate view or requests that it be renamed (ie. Gantt Chart).  As it doesn't generate an error number and its intermittent I don't know how to handle this in VBA. 

    Any suggestions would be much appreciated. 

    Friday, November 9, 2012 1:26 AM

All replies

  • bbaron927,

    Not sure if this will help but try:

    DisplayAlerts=false

    John

    Friday, November 9, 2012 2:24 AM
  • If Displayalerts=false doesn't work then you have a problem. You can try adding an interrupt for file_open and if the code runs before the message you can try deleting the typical Views and tables that cause the message.

    If the message appears before teh open event you can only eliminate problems views from schedules. I also suspect that  your Enterprise Global file is corrupted by including local views and tables etc. Might help to clean it out.


    Rod Gill

    The one and only Project VBA Book

    Rod Gill Project Management

    Friday, November 9, 2012 2:30 AM
    Moderator
  • DisplayAlerts didn't work so yes, I have a problem.  It would appear that a few rogue local views have "magically" appeared in the Enterprise Global file.  Given the age of the database, I am hoping this has occurred in the distant past.  Nevertheless the base Gantt Chart view has been altered so I'm copying back the Enterprise Gantt Chart and renaming it.  So generally I have some cleaning up to do. 

    Good pick up.  Thanks for the advice.

    ..............bruce

    Friday, November 9, 2012 4:44 AM