| |
Sub CreateOutlinedSchedulewithDataGraph(ByVal objmilestones As Object)
With objmilestones
'Set Title
.SetTitle1("Outlined schedule with a type 3 DataGraph")
'Set up Symbols in the ToolBox
.SetToolboxSymbolProperty(1, "Type", 44)
.SetToolboxSymbolProperty(1, "FillColor", RGB(0, 255, 0))
.SetToolboxSymbolProperty(2, "Type", 43)
.SetToolboxSymbolProperty(2, "FillColor", RGB(0, 255, 0))
.SetToolboxSymbolProperty(3, "Type", 3)
.SetToolboxSymbolProperty(3, "FillColor", RGB(0, 0, 255))
.SetToolboxSymbolProperty(4, "Type", 3)
.SetToolboxSymbolProperty(4, "FillColor", RGB(0, 0, 255))
.SetToolboxSymbolProperty(32, "Type", 18)
.SetToolboxHorizontalConnectorProperty(1, "Type", 7)
.SetToolboxHorizontalConnectorProperty(1, "FillColor", RGB(0, 255, 0))
.SetToolboxHorizontalConnectorProperty(2, "Type", 5)
.SetToolboxHorizontalConnectorProperty(2, "FillColor", RGB(0, 0, 255))
.SetToolboxHorizontalConnectorProperty(2, "OutlineColor", RGB(128, 0, 0))
'Remove Unneeded Columns and Rows From Template
.SetColumnWidth(1, 0)
.SetColumnWidth(2, 0)
.SetColumnWidth(3, 2.8)
.SetLinesPerPage(8)
'Put Text in Task Column
.PutCell(1, 3, "Project 1")
.PutCell(2, 3, "Task 1-1")
.PutCell(3, 3, "Task 1-2")
.PutCell(4, 3, "Task 1-3")
.PutCell(5, 3, "Project 2")
.PutCell(6, 3, "Task 2-1")
.PutCell(7, 3, "Task 2-2")
.PutCell(8, 3, "Task 2-3")
.SetStartAndEndDates("1/1/2024", "12/31/2024")
.SetCurrentDate("6/13/2024")
.AddCurtain("3/10/2018", "5/20/2024")
.setcurtainproperties(1, "3/10/2024", "5/20/2024", RGB(50, 132, 186), RGB(0, 255, 255), 14, 1)
.setmiscproperty("ShowCurtainsOverHorzGridlines", 1)
'Setup Outline Levels and Summary Bar Settings
.SetColumnProperty(3, "Indent", 0.3)
.SetOutlineLevel(2, 2)
.SetOutlineLevel(3, 2)
.SetOutlineLevel(4, 2)
.SetOutlineLevel(6, 2)
.SetOutlineLevel(7, 2)
.SetOutlineLevel(8, 2)
.SetSummaryBarDisplay(2)
.AddSymbol(2, "2/28/2024", 3, 2, 2)
.AddSymbol(2, "9/17/2024", 4)
.setpercentcomplete(2, 50)
.AddSymbol(3, "5/18/2024", 3, 2, 2)
.AddSymbol(3, "9/20/2024", 4)
.setpercentcomplete(3, 50)
.AddSymbol(4, "7/29/2024", 3, 2, 2)
.AddSymbol(4, "11/4/2024", 4)
.setpercentcomplete(4, 50)
.AddSymbol(6, "5/14/2024", 3, 2, 2)
.AddSymbol(6, "10/30/2024", 4)
.setpercentcomplete(6, 50)
.AddSymbol(7, "5/21/2024", 3, 2, 2)
.AddSymbol(7, "10/25/2024", 4)
.setpercentcomplete(7, 50)
.AddSymbol(8, "5/31/2024", 3, 2, 2)
.AddSymbol(8, "10/25/2024", 4)
'Insert Budget and Actual Cost Columns
.SetFontStyle(17, 0, -1, 18)
.SetColumnProperty(11, "SmartColumn", "Values")
.SetColumnProperty(11, "ColumnBackgroundColor", RGB(0, 255, 255))
.SetColumnProperty(11, "ColumnHeadingLine1", "Budget")
.SetColumnProperty(11, "ColumnHeadingLine2", "")
.SetColumnProperty(11, "ColumnHorzTextAlign", 2)
.SetColumnProperty(11, "DisplayColumnAsCurrency", 1)
.SetColumnProperty(11, "HeadingBackgroundColor", RGB(0, 255, 255))
.SetColumnProperty(11, "NumberDecimals", 2)
.SetColumnProperty(11, "Width", 1.23)
.SetFontStyle(18, 0, -1, 18)
.SetColumnProperty(12, "SmartColumn", "Values")
.SetColumnProperty(12, "ColumnBackgroundColor", RGB(255, 255, 128))
.SetColumnProperty(12, "ColumnHeadingLine1", "Actual")
.SetColumnProperty(12, "ColumnHeadingLine2", "Cost")
.SetColumnProperty(12, "ColumnHorzTextAlign", 2)
.SetColumnProperty(12, "DisplayColumnAsCurrency", 1)
.SetColumnProperty(12, "HeadingBackgroundColor", RGB(255, 255, 128))
.SetColumnProperty(12, "NumberDecimals", 2)
.SetColumnProperty(12, "Width", 1.17)
'Fill Budget and Actual Cost Columns
.PutCell(2, 11, 122)
.PutCell(3, 11, 124)
.PutCell(4, 11, 322)
.PutCell(6, 11, 343)
.PutCell(7, 11, 333)
.PutCell(8, 11, 222)
.PutCell(2, 12, 444)
.PutCell(3, 12, 333)
.PutCell(4, 12, 22)
.PutCell(6, 12, 444)
.PutCell(7, 12, 432)
.PutCell(8, 12, 121)
'Remove Legend
.SetLegendHeight(0)
'Set Up ValueSets
.SetValueSetName(1, "Budget")
.SetValueSetProperty(1, "Type", 3)
.SetValueSetProperty(1, "LineType", 1)
.SetValueSetProperty(1, "BarPattern", 1)
.SetValueSetProperty(1, "LineColor", RGB(255, 255, 0))
.SetValueSetProperty(1, "FillColor", RGB(255, 255, 0))
.SetValueSetProperty(1, "Show", "GraphOn")
.SetValueSetProperty(1, "Show", "GraphCumulativeOff")
.SetValueSetProperty(1, "Show", "CurrencyOn")
.SetValueSetProperty(1, "Show", "NumericOff")
.SetValueSetProperty(1, "Show", "GraphCumulativeOn")
.SetValueSetProperty(1, "Type3Column", 11)
.SetValueSetName(2, "Actual Cost")
.SetValueSetProperty(2, "Type", 3)
.SetValueSetProperty(2, "LineType", 1)
.SetValueSetProperty(2, "BarPattern", 1)
.SetValueSetProperty(2, "LineColor", RGB(255, 255, 0))
.SetValueSetProperty(2, "FillColor", RGB(255, 255, 0))
.SetValueSetProperty(2, "Show", "GraphOn")
.SetValueSetProperty(2, "Show", "GraphCumulativeOff")
.SetValueSetProperty(2, "Show", "CurrencyOn")
.SetValueSetProperty(2, "Show", "NumericOff")
.SetValueSetProperty(2, "Show", "GraphCumulativeOn")
.SetValueSetProperty(2, "Type3Column", 12)
'Set up DataGraph
.SetDataGraphProperty(1, "ClearValueSets", 0)
.SetDataGraphProperty(1, "Height", 1)
.refresh
.SetDataGraphProperty(1, "LineBar", "Bar")
.SetDataGraphProperty(1, "ShowGraph", "On")
.SetDataGraphProperty(1, "Height", 1)
.SetDataGraphProperty(1, "showgraph", "on")
.SetDataGraphProperty(1, "IncludeValueSet", 1)
.SetDataGraphProperty(1, "IncludeValueSet", 2)
.refresh
End With
End Sub
|