Summary: This program starts Milestones Professional, creates a new file, and then places text into seven task lines, one per row, and then adds seven symbols using a counter for the month. Note that this program assumes that month is the first position of the sort date format.
Public Sub Example4()
Dim objmilestones As Object
Dim strtemp As String
objMilestones = CreateObject("Milestones")
With objMilestones
.Activate()
.use20columns()
For ncounter = 1 To 20
.setcolumnproperty(ncounter, "width", 0)
.setcolumnproperty(ncounter, "SmartColumn ", "none")
Next
.setcolumnproperty(10, "width", 1) 'Task Column
For nCounter = 1 To 7
strTemp = "This is Task Row " + CStr(nCounter)
.PutCell(nCounter, 10, strtemp)
strtemp = CStr(nCounter + 1) + "/1/2017"
.AddSymbol(nCounter, strTemp, nCounter)
Next nCounter
.setstartandenddates("1/1/2017", "12/31/2017")
.Refresh()
End With
Exit Sub
End
End Sub
Running this program will produce a chart similar to the one below:
Milestones Professional 2019 Automation Methods and Properties. © Copyright 2018, KIDASA Software, Inc. All rights reserved.