Quantcast
Channel: Project Customization and Programming forum
Viewing all articles
Browse latest Browse all 5347

Custom Table/View From Scratch to Avoid Error

$
0
0

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


Viewing all articles
Browse latest Browse all 5347

Trending Articles