none
Custom Table/View From Scratch to Avoid Error RRS feed

  • Question

  • I'm trying to create a custom table and view from scratch in a project opened from Project Server. Currently I am getting an "enterprise global already contains"  error creating a table/view with the code outlined below.  How can I code this to avoid the error?

            ActiveProject.Application.ViewApply(Name:="Gantt Chart", SinglePane:=True, Toggle:=True)
            ActiveProject.Application.TableEditEx(Name:="PM_Status", TaskTable:=True, Create:=True, OverwriteExisting:=True, FieldName:="ID", Title:="", Width:=6, Align:=1, ShowInMenu:=False, LockFirstColumn:=True, DateFormat:=255, RowHeight:=1, AlignTitle:=0, WrapText:=False)
            ActiveProject.Application.TableEditEx(Name:="PM_Status", TaskTable:=True, NewFieldName:="Name", Title:="Task Name", Width:=32, Align:=0, LockFirstColumn:=True, DateFormat:=255, RowHeight:=1, AlignTitle:=0, WrapText:=True)
            ActiveProject.Application.TableEditEx(Name:="PM_Status", TaskTable:=True, NewFieldName:="PercentComplete", Title:="", Width:=12, Align:=0, LockFirstColumn:=True, DateFormat:=255, RowHeight:=1, AlignTitle:=1, WrapText:=False)
            ActiveProject.Application.TimescaleEdit(MajorUnits:=2, MajorLabel:=9, Separator:=True,MajorUseFY:=True, TierCount:=1)
            ActiveProject.Application.ViewCopy("PM_Status")

            ActiveProject.Application.TableApply(Name:="PM_Status")

    Application.OutlineShowAllTasks()
    Application.FilterEdit(Name:="__Status", TaskFilter:=True, Create:=True, OverwriteExisting:=True, FieldName:=My.Settings.StatusTextField, Test:="does not equal", Value:="", ShowInMenu:=False, ShowSummaryTasks:=False)
    Application.FilterApply(Name:="__Status")


    Blah

    Thursday, September 11, 2014 10:15 AM

All replies

  • Trevor,

    Have you tried the simple solution of using a different name for your custom view (e.g. "PM_Stat" instead of "PM_Status")?

    John

    Thursday, September 11, 2014 4:00 PM