Example 3 - Create and Save Under a New File Name

Summary:

This program starts Milestones Professional, creates a new file, adds a symbol on task rowA horizontal row on the schedule, usually containing the name of a project step and important milestone dates for that step. 1, and then saves the file under file name: "Test File From VBA.MLJ"

Example Code:

Public Sub Example3()

Set objMilestones = CreateObject("Milestones")

With objMilestones

 

 

.Activate

 

.AddSymbol 1, "11/12/2023", 2

 

nFileHandleVariant = 0

 

 

 

nFileHandleVariant = .Save("c:\myfiles\"+ "Test File From VBG.MLJ")

 

nFileHandleInt = nFileHandleVariant

 

If (nFileHandleInt = 0) Then

 

 

 

MsgBox "File Save Failed"

 

End If

 

.Refresh

 

.Close

End With

Exit Sub

End Sub

  Notes:

 

visit our programmer's page for more examples

 

Milestones Professional 2021 Automation Methods and Properties.  © Copyright 2001-2021, KIDASA Software, Inc. All rights reserved.