Farbschema: Hell
Sie befinden sich hier: start » en » Documentation » Microsoft Access development tools » WKL Forms Object Library » WKL Forms Object Library API reference » WklGantt

WklGantt

WklGantt class

Signature

Dim myWklGantt As WklGantt
Set myWklGantt = Me!ControlName.Object

Summary

A Gantt chart: the tasks as a hierarchical datasheet with a timeline of bars, milestones, summary tasks and dependencies, with working calendar and scheduling.

Parameters

None

Remarks

WklGantt has every member and event of `WklTreeList`: binding, columns, editing, master-detail, export. Each record is a task; a record with child records is a summary task whose start, finish and progress are computed from its subtasks.

The task fields are named by properties (StartField, FinishField or DurationField, ProgressField …). Dependencies come from a table (DependencySource) or from a text field of the successor (PredecessorsField, for example 3EA+2;5AA); segments of split tasks, resources and free days come from further tables. Durations and lags count working time of the calendar (WorkDays, WorkHours, HolidaySource) in days or hours (DurationUnit).

ScheduleMode decides what happens when a task changes: wgsManual keeps every other task where it is and reports broken dependencies in Violations; wgsAutomatic schedules the dependent tasks as soon as their dependencies and constraints allow, as common project tools do. Tasks without dependencies and constraints are never moved.

The whole tree is always loaded; LazyLoad has no effect. Without SortField and with SortOrder = wsoAscending, sibling tasks are ordered by their start, then by text; a sorted column or a SortField wins.

The control shows the task list on the left and the timeline on the right, in form view and in design view (with LivePreview): a two-row time scale, non-working time shaded, bars with their completed part, split tasks, summary tasks, milestones, baselines (ShowBaseline), deadlines, labels, dependency arrows (broken ones red and dashed), the critical path (ShowCriticalPath), lines for today and the status date, and the timeline strip (ShowTimeline). One vertical scroll bar right of the timeline moves both parts. Ctrl+mouse wheel zooms, Shift+mouse wheel scrolls the time; the shortcut menu of the timeline offers zoom, today and the display switches. Drag the gap between list and timeline to set SplitterPosition.

Change tasks with the mouse in the timeline (AllowTaskEditing): drag a bar to move the task, its left or right edge to change start or finish, and the handle at the end of the completed part (lower half of the bar) to change the progress. Draw a dependency (AllowLinkEditing) from the small zone just before or after a bar to another bar; where you drop it decides the type: from the end to the left half of the target is finish-to-start (EA), to the right half finish-to-finish (EE); from the start, start-to-start (AA) or start-to-finish (AE). Right-click an arrow to delete its dependency. While you drag, a dashed bar and a tooltip show the result; press Esc to cancel. Moves snap to whole days (whole hours at hour zoom when DurationUnit is hours).

Every change of the user, in the timeline or in the start, finish, duration and progress columns, raises BeforeTaskChange (or BeforeLinkAdd, BeforeLinkDelete), is written as one transaction together with the tasks automatic scheduling moved and the summary values (UpdateSummaries), and raises AfterTaskChange (or AfterLinkAdd, AfterLinkDelete). Cancel writes nothing; an error goes to DataError. The same changes made by code (SetTaskDates, LinkTasks, CellValue …) raise none of these events.

The shortcut menus of list and timeline offer the planning commands of common project tools for the selected tasks: link them in display order (Ctrl+F2, finish-to-start), unlink them (Ctrl+Shift+F2; one task: all its dependencies, several: those between them), indent and outdent them (Alt+Shift+Right/Left), assign resources in a dialog, mark them 0, 25, 50, 75 or 100 % complete, split the task under the mouse there (timeline; needs SegmentSource, the work resumes one working day later), switch automatic scheduling (ScheduleMode, for the open form only) and reschedule the whole project. Ctrl+Shift+F5 scrolls the timeline to the selected task. Each command raises the same events as the mouse; rescheduling the project writes with BeforeUpdate/AfterUpdate only. The tooltip of a bar names the broken dependencies, constraints and deadlines of its task.

Set the chart up in its designer (row Custom [...] of the property sheet (Opening the designer), or the […] button of any chart property): next to the pages of WklTreeList it has the pages Tasks (task fields, progress scale, date change mode, summaries), Dependencies (dependency table or predecessor text, segments), Resources (resource text or tables), Calendar and scheduling (scheduling mode, unit, working days and hours, free days), and Timeline (zoom, period, display, colors, editing with the mouse). The field lists come from the database; a live preview shows list and timeline with the real data. OK writes every changed property into the form.

The exports of the list include the chart. ExportToXlsx with wemWysiwyg writes the timeline as real worksheet cells right of the list: one Excel column per unit of Zoom, the two-row time scale as merged header cells, task bars as filled cells in the bar color (completed part darker), summary tasks as a thick line, milestones as ◆, free days shaded and today marked; the list stays frozen while the timeline scrolls. Dependency arrows, baselines, deadlines and the status line have no cell form and are left out. The data exports (ExportToXlsx with wemDataAware, ExportToXml, ExportToJson) add start, finish, duration, progress, predecessors and resources as columns where no column shows them already, and XML and JSON list the dependencies under links. ExportToImage and ExportToPdf draw the chart as a picture, and ExportToProject writes the plan as Microsoft Project XML. The shortcut menu „Exportieren …“ offers PDF, PNG and MS Project XML as well.

ImportFromProject reads a Microsoft Project XML file back and matches it with the tables: a task that finds its record changes it, the others are added, dependencies and resource assignments follow per pair, and free days are added to HolidaySource. Set ProjectUidField to keep the Project UID of every task; then a plan that came from Project keeps its identity in both directions. The shortcut menu „Aus MS Project importieren …“ opens the import dialog, which shows what would be written before anything is.

Screen readers and test tools see the task list as a data grid (as WklTreeList) and the timeline as a list named after the control („List1 timeline“) with one item per bar: its name is the task, its help text the text of the bar's tooltip (dates, duration, progress, resources, slack, broken rules); selecting an item selects the task. Layout (inherited) also keeps the zoom, the splitter position and the first visible day of the timeline.

An ActiveX control: inserted into a form in design view (Form Design › Controls › ActiveX Controls); reports are not supported. VBA reaches it through the Object property of the control, where ControlName is the name of the control on the form.

MemberKindSummary
`StartField`PropertyGets or sets the field with the start of a task.
`FinishField`PropertyGets or sets the field with the finish of a task.
`DurationField`PropertyGets or sets the field with the duration, used when FinishField is empty.
`ProgressField`PropertyGets or sets the field with the progress of a task.
`MilestoneField`PropertyGets or sets the Yes/No field that marks a milestone.
`ConstraintTypeField`PropertyGets or sets the field with the constraint of a task.
`ConstraintDateField`PropertyGets or sets the field with the date of the constraint.
`BaselineStartField`PropertyGets or sets the field with the start of the baseline (the planned start).
`BaselineFinishField`PropertyGets or sets the field with the finish of the baseline (the planned finish).
`DeadlineField`PropertyGets or sets the field with the deadline of a task.
`TimelineField`PropertyGets or sets the Yes/No field that shows a task on the timeline strip above the chart.
`BarColorField`PropertyGets or sets the field with the bar color of a task.
`PredecessorsField`PropertyGets or sets the text field with the predecessors of a task, used when DependencySource is empty.
`DependencySource`PropertyGets or sets the table, query or SQL statement with one dependency per record.
`PredecessorField`PropertyGets or sets the field of the dependencies with the key of the predecessor.
`SuccessorField`PropertyGets or sets the field of the dependencies with the key of the successor.
`LinkTypeField`PropertyGets or sets the field of the dependencies with the type.
`LagField`PropertyGets or sets the field of the dependencies with the lag.
`SegmentSource`PropertyGets or sets the table, query or SQL statement with the segments of split tasks.
`SegmentTaskField`PropertyGets or sets the field of the segments with the key of the task.
`SegmentStartField`PropertyGets or sets the field of the segments with the start.
`SegmentFinishField`PropertyGets or sets the field of the segments with the finish.
`ResourcesField`PropertyGets or sets the text field with the resources of a task, used when AssignmentSource is empty.
`ResourceSource`PropertyGets or sets the table, query or SQL statement with the resources.
`ResourceKeyField`PropertyGets or sets the field of the resources with the key.
`ResourceNameField`PropertyGets or sets the field of the resources with the name.
`ResourceColorField`PropertyGets or sets the field of the resources with a bar color.
`AssignmentSource`PropertyGets or sets the table, query or SQL statement with the assignments of resources to tasks.
`AssignmentTaskField`PropertyGets or sets the field of the assignments with the key of the task.
`AssignmentResourceField`PropertyGets or sets the field of the assignments with the key of the resource.
`AssignmentUnitsField`PropertyGets or sets the field of the assignments with the share of the resource.
`HolidaySource`PropertyGets or sets the table, query or SQL statement with the free days.
`HolidayField`PropertyGets or sets the date field of the free days.
`DurationUnit`PropertyGets or sets whether durations and lags count working days or working hours.
`WorkDays`PropertyGets or sets the working weekdays.
`WorkHours`PropertyGets or sets the working hours of a working day.
`ScheduleMode`PropertyGets or sets what happens to dependent tasks when a task changes.
`DateChangeMode`PropertyGets or sets whether a new start entered in the grid moves the task or changes its duration.
`UpdateSummaries`PropertyGets or sets whether the computed start, finish and progress of summary tasks are written into their records.
`ProgressScale`PropertyGets or sets the range of ProgressField and TaskProgress.
`LeftTextField`PropertyGets or sets the field whose value is shown left of the bar.
`RightTextField`PropertyGets or sets the field whose value is shown right of the bar.
`InsideTextField`PropertyGets or sets the field whose value is shown inside the bar.
`Zoom`PropertyGets or sets the time unit of a column of the timeline.
`TimescaleWidth`PropertyGets or sets the width of a timeline column.
`ChartStart`PropertyGets or sets the first date of the timeline.
`ChartFinish`PropertyGets or sets the last date of the timeline.
`SplitterPosition`PropertyGets or sets the width of the task list left of the timeline.
`ShowCriticalPath`PropertyGets or sets whether critical tasks are drawn in CriticalColor.
`ShowBaseline`PropertyGets or sets whether the baseline is drawn below the bars.
`ShowTimeline`PropertyGets or sets whether the timeline strip is shown above the chart.
`ShowToday`PropertyGets or sets whether a line marks today.
`StatusDate`PropertyGets or sets the status date, drawn as a vertical line.
`BarColor`PropertyGets or sets the color of task bars.
`SummaryColor`PropertyGets or sets the color of summary bars.
`MilestoneColor`PropertyGets or sets the color of milestones.
`CriticalColor`PropertyGets or sets the color of critical tasks.
`AllowTaskEditing`PropertyGets or sets whether bars can be moved and resized and their progress dragged.
`AllowLinkEditing`PropertyGets or sets whether dependencies can be drawn and deleted in the timeline.
`TaskStart`PropertyReturns the start of a task as the table stores it.
`TaskFinish`PropertyReturns the finish of a task as the table stores it.
`TaskDuration`PropertyReturns the duration of a task.
`TaskProgress`PropertyGets or sets the progress of a task.
`TaskSlack`PropertyReturns the total float of a task.
`IsCritical`PropertyReturns whether a task is on the critical path.
`TaskPredecessors`PropertyReturns the predecessors of a task as text.
`TaskResources`PropertyGets or sets the resources of a task as text.
`SetTaskDates`MethodSets the start and finish of a task and writes them.
`LinkTasks`MethodAdds a dependency between two tasks and writes it.
`UnlinkTasks`MethodRemoves the dependency between two tasks and writes that.
`SplitTask`MethodSplits a task at a moment: the work after it resumes later.
`Reschedule`MethodSchedules every task with dependencies or constraints as soon as possible and writes the result.
`Issues`PropertyReturns the problems found in the data.
`Violations`PropertyReturns the rules tasks do not keep.
`ProjectStart`PropertyReturns the earliest start of all tasks.
`ProjectFinish`PropertyReturns the latest finish of all tasks.
`TaskKind`PropertyReturns what the row of a task shows.
`ExportToImage`MethodExports the chart, task list and timeline, as a picture.
`ExportToPdf`MethodExports the chart as a PDF document on A4 pages in landscape.
`ExportToProject`MethodExports the plan as Microsoft Project XML, a file Microsoft Project opens.
`ProjectUidField`PropertyGets or sets the field that holds the unique ID (UID) of each task in Microsoft Project.
`ImportFromProject`MethodReads a Microsoft Project XML file and writes its tasks, dependencies and resource assignments into the tables, by matching.
`IndentTask`MethodIndents a task: it becomes the last subtask of the task before it on its level.
`OutdentTask`MethodOutdents a task: it follows its summary task on the summary's level.
EventSummary
`BeforeTaskChange`Occurs before the user changes a task by dragging, in the grid or by the progress handle.
`AfterTaskChange`Occurs after the user changed a task and it was written.
`BeforeLinkAdd`Occurs before the user adds a dependency.
`AfterLinkAdd`Occurs after the user added a dependency and it was written.
`BeforeLinkDelete`Occurs before the user deletes a dependency.
`AfterLinkDelete`Occurs after the user deleted a dependency.
`TaskClick`Occurs when the user clicks a bar.
`TaskDblClick`Occurs when the user double-clicks a bar.

Code example

With Me!Gantt1.Object
    .RecordSource = "tblTasks"
    .KeyField = "ID": .ParentField = "ParentID": .TextField = "Name"
    .StartField = "Start": .FinishField = "Finish": .ProgressField = "Done"
    .DependencySource = "tblLinks": .PredecessorField = "FromID": .SuccessorField = "ToID"
    .ScheduleMode = wgsAutomatic
    .LinkTasks 3, 4, wglFinishToStart, 1
    Debug.Print .TaskStart(4), .TaskFinish(4), .IsCritical(4)
End With

Inheritance

WklGantt inherits every member of `WklTreeList`, which inherits from `WklTreeView`; inherited members are described on the base class's page.

StartField property

Signature

Property Get StartField() As String
Property Let StartField(RHS As String)

Summary

Gets or sets the field with the start of a task.

Parameters

None

Property value: String – A field name of RecordSource.

Remarks

A task without start has no bar. With DurationUnit = wguDays the time of day is ignored.

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

FinishField property

Signature

Property Get FinishField() As String
Property Let FinishField(RHS As String)

Summary

Gets or sets the field with the finish of a task.

Parameters

None

Property value: String – A field name; empty to compute the finish from DurationField.

Remarks

In days the finish is the last working day of the task: a task from Monday to Monday lasts one day. A finish before the start is reported in Issues.

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

DurationField property

Signature

Property Get DurationField() As String
Property Let DurationField(RHS As String)

Summary

Gets or sets the field with the duration, used when FinishField is empty.

Parameters

None

Property value: String – A field name; the duration counts working time in DurationUnit. A duration of 0 makes a milestone.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

ProgressField property

Signature

Property Get ProgressField() As String
Property Let ProgressField(RHS As String)

Summary

Gets or sets the field with the progress of a task.

Parameters

None

Property value: String – A field name; the range is set by ProgressScale.

Remarks

A task at 100 % is complete: automatic scheduling leaves it where it is.

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

MilestoneField property

Signature

Property Get MilestoneField() As String
Property Let MilestoneField(RHS As String)

Summary

Gets or sets the Yes/No field that marks a milestone.

Parameters

None

Property value: String – A field name; empty to treat tasks with duration 0 as milestones.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

ConstraintTypeField property

Signature

Property Get ConstraintTypeField() As String
Property Let ConstraintTypeField(RHS As String)

Summary

Gets or sets the field with the constraint of a task.

Parameters

None

Property value: String – A field name; the field holds a `WklGanttConstraint` value.

Remarks

In automatic mode a task moved by SetTaskDates gets wgcStartNoEarlierThan with its new start, so the move holds; the constraint is written when this field and ConstraintDateField are set.

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

ConstraintDateField property

Signature

Property Get ConstraintDateField() As String
Property Let ConstraintDateField(RHS As String)

Summary

Gets or sets the field with the date of the constraint.

Parameters

None

Property value: String – A field name; a start date for the start constraints, a finish date for the finish constraints.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

BaselineStartField property

Signature

Property Get BaselineStartField() As String
Property Let BaselineStartField(RHS As String)

Summary

Gets or sets the field with the start of the baseline (the planned start).

Parameters

None

Property value: String – A field name.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

BaselineFinishField property

Signature

Property Get BaselineFinishField() As String
Property Let BaselineFinishField(RHS As String)

Summary

Gets or sets the field with the finish of the baseline (the planned finish).

Parameters

None

Property value: String – A field name.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

DeadlineField property

Signature

Property Get DeadlineField() As String
Property Let DeadlineField(RHS As String)

Summary

Gets or sets the field with the deadline of a task.

Parameters

None

Property value: String – A field name; a task that finishes later is listed in Violations.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

TimelineField property

Signature

Property Get TimelineField() As String
Property Let TimelineField(RHS As String)

Summary

Gets or sets the Yes/No field that shows a task on the timeline strip above the chart.

Parameters

None

Property value: String – A field name.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

BarColorField property

Signature

Property Get BarColorField() As String
Property Let BarColorField(RHS As String)

Summary

Gets or sets the field with the bar color of a task.

Parameters

None

Property value: String – A field name; the field holds an Access color number. Null uses BarColor.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

PredecessorsField property

Signature

Property Get PredecessorsField() As String
Property Let PredecessorsField(RHS As String)

Summary

Gets or sets the text field with the predecessors of a task, used when DependencySource is empty.

Parameters

None

Property value: String – A field name.

Remarks

The text lists predecessor keys separated by ;, each with an optional type (EA finish-to-start, AA, EE, AE; English FS, SS, FF, SF are read as well) and an optional lag (+2, -1, +4h, +2t): 3EA+2;5AA;7. A key that contains a separator, sign or ends in a type is written in double quotes. Works for single-field keys only.

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

DependencySource property

Signature

Property Get DependencySource() As String
Property Let DependencySource(RHS As String)

Summary

Gets or sets the table, query or SQL statement with one dependency per record.

Parameters

None

Property value: String – The name of a table or query, or an SQL statement; empty when PredecessorsField is used.

Remarks

Needs PredecessorField and SuccessorField; LinkTypeField and LagField are optional. LinkTasks and UnlinkTasks add and delete records here.

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

PredecessorField property

Signature

Property Get PredecessorField() As String
Property Let PredecessorField(RHS As String)

Summary

Gets or sets the field of the dependencies with the key of the predecessor.

Parameters

None

Property value: String – A field name; for a composite key the fields separated by ;, in the order of KeyField.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

SuccessorField property

Signature

Property Get SuccessorField() As String
Property Let SuccessorField(RHS As String)

Summary

Gets or sets the field of the dependencies with the key of the successor.

Parameters

None

Property value: String – A field name; for a composite key the fields separated by ;.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

LinkTypeField property

Signature

Property Get LinkTypeField() As String
Property Let LinkTypeField(RHS As String)

Summary

Gets or sets the field of the dependencies with the type.

Parameters

None

Property value: String – A field name; the field holds a `WklGanttLinkType` value. Empty: every dependency is finish-to-start.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

LagField property

Signature

Property Get LagField() As String
Property Let LagField(RHS As String)

Summary

Gets or sets the field of the dependencies with the lag.

Parameters

None

Property value: String – A field name; the lag counts working time in DurationUnit, negative for an overlap.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

SegmentSource property

Signature

Property Get SegmentSource() As String
Property Let SegmentSource(RHS As String)

Summary

Gets or sets the table, query or SQL statement with the segments of split tasks.

Parameters

None

Property value: String – The name of a table or query, or an SQL statement.

Remarks

One record per worked part of a task. A task with segments takes its start and finish from them. SplitTask writes the segments here.

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

SegmentTaskField property

Signature

Property Get SegmentTaskField() As String
Property Let SegmentTaskField(RHS As String)

Summary

Gets or sets the field of the segments with the key of the task.

Parameters

None

Property value: String – A field name; for a composite key the fields separated by ;.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

SegmentStartField property

Signature

Property Get SegmentStartField() As String
Property Let SegmentStartField(RHS As String)

Summary

Gets or sets the field of the segments with the start.

Parameters

None

Property value: String – A field name.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

SegmentFinishField property

Signature

Property Get SegmentFinishField() As String
Property Let SegmentFinishField(RHS As String)

Summary

Gets or sets the field of the segments with the finish.

Parameters

None

Property value: String – A field name.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

ResourcesField property

Signature

Property Get ResourcesField() As String
Property Let ResourcesField(RHS As String)

Summary

Gets or sets the text field with the resources of a task, used when AssignmentSource is empty.

Parameters

None

Property value: String – A field name.

Remarks

The text lists names separated by ;, each with an optional share in percent: Miller;Smith[50%]. With ResourceSource the names are looked up there; without it, every name is a resource.

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

ResourceSource property

Signature

Property Get ResourceSource() As String
Property Let ResourceSource(RHS As String)

Summary

Gets or sets the table, query or SQL statement with the resources.

Parameters

None

Property value: String – The name of a table or query, or an SQL statement.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

ResourceKeyField property

Signature

Property Get ResourceKeyField() As String
Property Let ResourceKeyField(RHS As String)

Summary

Gets or sets the field of the resources with the key.

Parameters

None

Property value: String – A field name.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

ResourceNameField property

Signature

Property Get ResourceNameField() As String
Property Let ResourceNameField(RHS As String)

Summary

Gets or sets the field of the resources with the name.

Parameters

None

Property value: String – A field name.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

ResourceColorField property

Signature

Property Get ResourceColorField() As String
Property Let ResourceColorField(RHS As String)

Summary

Gets or sets the field of the resources with a bar color.

Parameters

None

Property value: String – A field name; optional.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

AssignmentSource property

Signature

Property Get AssignmentSource() As String
Property Let AssignmentSource(RHS As String)

Summary

Gets or sets the table, query or SQL statement with the assignments of resources to tasks.

Parameters

None

Property value: String – The name of a table or query, or an SQL statement.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

AssignmentTaskField property

Signature

Property Get AssignmentTaskField() As String
Property Let AssignmentTaskField(RHS As String)

Summary

Gets or sets the field of the assignments with the key of the task.

Parameters

None

Property value: String – A field name; for a composite key the fields separated by ;.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

AssignmentResourceField property

Signature

Property Get AssignmentResourceField() As String
Property Let AssignmentResourceField(RHS As String)

Summary

Gets or sets the field of the assignments with the key of the resource.

Parameters

None

Property value: String – A field name.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

AssignmentUnitsField property

Signature

Property Get AssignmentUnitsField() As String
Property Let AssignmentUnitsField(RHS As String)

Summary

Gets or sets the field of the assignments with the share of the resource.

Parameters

None

Property value: String – A field name; the share in percent, 100 when the field is empty or Null.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

HolidaySource property

Signature

Property Get HolidaySource() As String
Property Let HolidaySource(RHS As String)

Summary

Gets or sets the table, query or SQL statement with the free days.

Parameters

None

Property value: String – The name of a table or query, or an SQL statement.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

HolidayField property

Signature

Property Get HolidayField() As String
Property Let HolidayField(RHS As String)

Summary

Gets or sets the date field of the free days.

Parameters

None

Property value: String – A field name.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

DurationUnit property

Signature

Property Get DurationUnit() As WklGanttDurationUnit
Property Let DurationUnit(RHS As WklGanttDurationUnit)

Summary

Gets or sets whether durations and lags count working days or working hours.

Parameters

None

Property value: `WklGanttDurationUnit` – A `WklGanttDurationUnit` constant. Default: wguDays.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

WorkDays property

Signature

Property Get WorkDays() As Long
Property Let WorkDays(RHS As Long)

Summary

Gets or sets the working weekdays.

Parameters

None

Property value: Long – The sum of 1 (Sunday), 2 (Monday), 4 (Tuesday), 8 (Wednesday), 16 (Thursday), 32 (Friday), 64 (Saturday). Default: 62, Monday to Friday.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

WorkHours property

Signature

Property Get WorkHours() As String
Property Let WorkHours(RHS As String)

Summary

Gets or sets the working hours of a working day.

Parameters

None

Property value: String – Spans separated by ;, for example 08:00-12:00;13:00-17:00 (default). The end of a span is not working time.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

ScheduleMode property

Signature

Property Get ScheduleMode() As WklGanttScheduleMode
Property Let ScheduleMode(RHS As WklGanttScheduleMode)

Summary

Gets or sets what happens to dependent tasks when a task changes.

Parameters

None

Property value: `WklGanttScheduleMode` – A `WklGanttScheduleMode` constant. Default: wgsManual.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

DateChangeMode property

Signature

Property Get DateChangeMode() As WklGanttDateChangeMode
Property Let DateChangeMode(RHS As WklGanttDateChangeMode)

Summary

Gets or sets whether a new start entered in the grid moves the task or changes its duration.

Parameters

None

Property value: `WklGanttDateChangeMode` – A `WklGanttDateChangeMode` constant. Default: wgdMoveTask.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

UpdateSummaries property

Signature

Property Get UpdateSummaries() As Boolean
Property Let UpdateSummaries(RHS As Boolean)

Summary

Gets or sets whether the computed start, finish and progress of summary tasks are written into their records.

Parameters

None

Property value: Boolean – True (default) to write them with every change, so queries and reports see the right values.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

ProgressScale property

Signature

Property Get ProgressScale() As WklGanttProgressScale
Property Let ProgressScale(RHS As WklGanttProgressScale)

Summary

Gets or sets the range of ProgressField and TaskProgress.

Parameters

None

Property value: `WklGanttProgressScale` – A `WklGanttProgressScale` constant. Default: wgpPercent (0 to 100).

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

LeftTextField property

Signature

Property Get LeftTextField() As String
Property Let LeftTextField(RHS As String)

Summary

Gets or sets the field whose value is shown left of the bar.

Parameters

None

Property value: String – A field name.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

RightTextField property

Signature

Property Get RightTextField() As String
Property Let RightTextField(RHS As String)

Summary

Gets or sets the field whose value is shown right of the bar.

Parameters

None

Property value: String – A field name; empty to show the resources of the task.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

InsideTextField property

Signature

Property Get InsideTextField() As String
Property Let InsideTextField(RHS As String)

Summary

Gets or sets the field whose value is shown inside the bar.

Parameters

None

Property value: String – A field name.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

Zoom property

Signature

Property Get Zoom() As WklGanttZoom
Property Let Zoom(RHS As WklGanttZoom)

Summary

Gets or sets the time unit of a column of the timeline.

Parameters

None

Property value: `WklGanttZoom` – A `WklGanttZoom` constant. Default: wgzDays.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

TimescaleWidth property

Signature

Property Get TimescaleWidth() As Long
Property Let TimescaleWidth(RHS As Long)

Summary

Gets or sets the width of a timeline column.

Parameters

None

Property value: Long – Percent of the default width, 25 to 400. Default: 100.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

ChartStart property

Signature

Property Get ChartStart() As Variant
Property Let ChartStart(RHS As Variant)

Summary

Gets or sets the first date of the timeline.

Parameters

None

Property value: Variant – A date, or Null to start at the earliest task (default).

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

ChartFinish property

Signature

Property Get ChartFinish() As Variant
Property Let ChartFinish(RHS As Variant)

Summary

Gets or sets the last date of the timeline.

Parameters

None

Property value: Variant – A date, or Null to end at the latest task (default).

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

SplitterPosition property

Signature

Property Get SplitterPosition() As Long
Property Let SplitterPosition(RHS As Long)

Summary

Gets or sets the width of the task list left of the timeline.

Parameters

None

Property value: Long – Twips; 0 for half of the control (default).

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

ShowCriticalPath property

Signature

Property Get ShowCriticalPath() As Boolean
Property Let ShowCriticalPath(RHS As Boolean)

Summary

Gets or sets whether critical tasks are drawn in CriticalColor.

Parameters

None

Property value: Boolean – True to highlight the critical path.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

ShowBaseline property

Signature

Property Get ShowBaseline() As Boolean
Property Let ShowBaseline(RHS As Boolean)

Summary

Gets or sets whether the baseline is drawn below the bars.

Parameters

None

Property value: Boolean – True to show baselines.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

ShowTimeline property

Signature

Property Get ShowTimeline() As Boolean
Property Let ShowTimeline(RHS As Boolean)

Summary

Gets or sets whether the timeline strip is shown above the chart.

Parameters

None

Property value: Boolean – True to show the tasks of TimelineField over the whole project.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

ShowToday property

Signature

Property Get ShowToday() As Boolean
Property Let ShowToday(RHS As Boolean)

Summary

Gets or sets whether a line marks today.

Parameters

None

Property value: Boolean – True (default) to show the line.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

StatusDate property

Signature

Property Get StatusDate() As Variant
Property Let StatusDate(RHS As Variant)

Summary

Gets or sets the status date, drawn as a vertical line.

Parameters

None

Property value: Variant – A date, or Null for none (default).

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

BarColor property

Signature

Property Get BarColor() As OLE_COLOR
Property Let BarColor(RHS As OLE_COLOR)

Summary

Gets or sets the color of task bars.

Parameters

None

Property value: OLE_COLOR – An Access color number.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

SummaryColor property

Signature

Property Get SummaryColor() As OLE_COLOR
Property Let SummaryColor(RHS As OLE_COLOR)

Summary

Gets or sets the color of summary bars.

Parameters

None

Property value: OLE_COLOR – An Access color number.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

MilestoneColor property

Signature

Property Get MilestoneColor() As OLE_COLOR
Property Let MilestoneColor(RHS As OLE_COLOR)

Summary

Gets or sets the color of milestones.

Parameters

None

Property value: OLE_COLOR – An Access color number.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

CriticalColor property

Signature

Property Get CriticalColor() As OLE_COLOR
Property Let CriticalColor(RHS As OLE_COLOR)

Summary

Gets or sets the color of critical tasks.

Parameters

None

Property value: OLE_COLOR – An Access color number; used with ShowCriticalPath.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

AllowTaskEditing property

Signature

Property Get AllowTaskEditing() As Boolean
Property Let AllowTaskEditing(RHS As Boolean)

Summary

Gets or sets whether bars can be moved and resized and their progress dragged.

Parameters

None

Property value: Boolean – True (default) to allow it.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

AllowLinkEditing property

Signature

Property Get AllowLinkEditing() As Boolean
Property Let AllowLinkEditing(RHS As Boolean)

Summary

Gets or sets whether dependencies can be drawn and deleted in the timeline.

Parameters

None

Property value: Boolean – True (default) to allow it.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

TaskStart property

Signature

Property Get TaskStart(ByVal Key As Variant) As Variant

Summary

Returns the start of a task as the table stores it.

Parameters

NameTypeOptionalDefaultDescription
KeyVariantNo–The key of the task.

Property value: Variant – The start; Null when the task has no bar. For a summary task the earliest start of its subtasks.

Remarks

Read-only.

Code example

None

Inheritance

Declared by WklGantt.

TaskFinish property

Signature

Property Get TaskFinish(ByVal Key As Variant) As Variant

Summary

Returns the finish of a task as the table stores it.

Parameters

NameTypeOptionalDefaultDescription
KeyVariantNo–The key of the task.

Property value: Variant – The finish; Null when the task has no bar. In days the last working day.

Remarks

Read-only.

Code example

None

Inheritance

Declared by WklGantt.

TaskDuration property

Signature

Property Get TaskDuration(ByVal Key As Variant) As Double

Summary

Returns the duration of a task.

Parameters

NameTypeOptionalDefaultDescription
KeyVariantNo–The key of the task.

Property value: Double – The working time in DurationUnit, without the gaps of a split task; 0 for a milestone.

Remarks

Read-only.

Code example

None

Inheritance

Declared by WklGantt.

TaskProgress property

Signature

Property Get TaskProgress(ByVal Key As Variant) As Double
Property Let TaskProgress(ByVal Key As Variant, RHS As Double)

Summary

Gets or sets the progress of a task.

Parameters

NameTypeOptionalDefaultDescription
KeyVariantNo–The key of the task.

Property value: Double – The progress in the range of ProgressScale. Setting it writes ProgressField and the summary tasks.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

TaskSlack property

Signature

Property Get TaskSlack(ByVal Key As Variant) As Double

Summary

Returns the total float of a task.

Parameters

NameTypeOptionalDefaultDescription
KeyVariantNo–The key of the task.

Property value: Double – The working time in DurationUnit the task can finish later without moving the end of the project or breaking a constraint; 0 or less for a critical task. For a summary task the smallest float of its subtasks.

Remarks

Read-only.

Code example

None

Inheritance

Declared by WklGantt.

IsCritical property

Signature

Property Get IsCritical(ByVal Key As Variant) As Boolean

Summary

Returns whether a task is on the critical path.

Parameters

NameTypeOptionalDefaultDescription
KeyVariantNo–The key of the task.

Property value: Boolean – True for a critical task, and for a summary task with a critical subtask.

Remarks

Read-only.

Code example

None

Inheritance

Declared by WklGantt.

TaskPredecessors property

Signature

Property Get TaskPredecessors(ByVal Key As Variant) As String

Summary

Returns the predecessors of a task as text.

Parameters

NameTypeOptionalDefaultDescription
KeyVariantNo–The key of the task.

Property value: String – The short form, for example 3EA+2;5AA.

Remarks

Read-only.

Code example

None

Inheritance

Declared by WklGantt.

TaskResources property

Signature

Property Get TaskResources(ByVal Key As Variant) As String
Property Let TaskResources(ByVal Key As Variant, RHS As String)

Summary

Gets or sets the resources of a task as text.

Parameters

NameTypeOptionalDefaultDescription
KeyVariantNo–The key of the task.

Property value: String – The short form, for example Miller;Smith[50%]; an empty text removes every assignment.

Remarks

Setting it replaces the assignments of the task where the chart keeps them: in the resource text (ResourcesField) or in the assignment table (AssignmentSource), where a resource is found by name and a new name is added to ResourceSource. Without either setting it raises wkeNotConfigured. Units in brackets are percent; without them a resource works 100 %. Raises no events, as other changes by code.

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

SetTaskDates method

Signature

Sub SetTaskDates(ByVal Key As Variant, ByVal Start As Date, ByVal Finish As Date)

Summary

Sets the start and finish of a task and writes them.

Parameters

NameTypeOptionalDefaultDescription
KeyVariantNo–The key of the task (not a summary task).
StartDateNo–The new start.
FinishDateNo–The new finish, as the table stores it.

Remarks

In automatic mode the task gets „start no earlier than“ its new start, and the dependent tasks are scheduled; all changes are written in one transaction, together with the summary tasks.

Code example

None

Inheritance

Declared by WklGantt.

LinkTasks method

Signature

Sub LinkTasks(ByVal Predecessor As Variant, ByVal Successor As Variant, Optional ByVal LinkType As WklGanttLinkType = wglFinishToStart, Optional ByVal Lag As Double = 0)

Summary

Adds a dependency between two tasks and writes it.

Parameters

NameTypeOptionalDefaultDescription
PredecessorVariantNo–The key of the predecessor.
SuccessorVariantNo–The key of the successor.
LinkType`WklGanttLinkType`YeswglFinishToStartA `WklGanttLinkType` constant. Default: wglFinishToStart.
LagDoubleYes0Working time in DurationUnit between the linked dates; negative for an overlap. Default: 0.

Remarks

A dependency that would close a cycle raises wkeCycle and writes nothing; one on a task's own summary task, a duplicate or a self link raises wkeInvalidValue. In automatic mode the successor is scheduled.

Code example

None

Inheritance

Declared by WklGantt.

UnlinkTasks method

Signature

Sub UnlinkTasks(ByVal Predecessor As Variant, ByVal Successor As Variant)

Summary

Removes the dependency between two tasks and writes that.

Parameters

NameTypeOptionalDefaultDescription
PredecessorVariantNo–The key of the predecessor.
SuccessorVariantNo–The key of the successor.

Remarks

Raises wkeKeyNotFound when the two tasks are not linked. The successor is not moved.

Code example

None

Inheritance

Declared by WklGantt.

SplitTask method

Signature

Sub SplitTask(ByVal Key As Variant, ByVal At As Date, Optional ByVal Gap As Double = 1)

Summary

Splits a task at a moment: the work after it resumes later.

Parameters

NameTypeOptionalDefaultDescription
KeyVariantNo–The key of the task.
AtDateNo–The moment inside the task where the work stops.
GapDoubleYes1Working time in DurationUnit until the work resumes. Default: 1.

Remarks

Needs SegmentSource and its fields (wkeNotConfigured otherwise). The duration stays; the finish moves by the gap.

Code example

None

Inheritance

Declared by WklGantt.

Reschedule method

Signature

Sub Reschedule()

Summary

Schedules every task with dependencies or constraints as soon as possible and writes the result.

Parameters

None

Remarks

Raises wkeCycle when the dependencies contain a cycle.

Code example

None

Inheritance

Declared by WklGantt.

Issues property

Signature

Property Get Issues() As Variant

Summary

Returns the problems found in the data.

Parameters

None

Property value: Variant – An array of texts: unknown predecessors or resources, self links, links between a summary task and its own subtasks, duplicates, cycles, unreadable texts, invalid segments, a finish before the start. Empty when the data is consistent.

Remarks

Read-only.

Code example

None

Inheritance

Declared by WklGantt.

Violations property

Signature

Property Get Violations() As Variant

Summary

Returns the rules tasks do not keep.

Parameters

None

Property value: Variant – An array of texts: dependencies whose successor lies too early, constraints not kept, deadlines passed. Empty when the plan is consistent.

Remarks

Read-only.

Code example

None

Inheritance

Declared by WklGantt.

ProjectStart property

Signature

Property Get ProjectStart() As Variant

Summary

Returns the earliest start of all tasks.

Parameters

None

Property value: Variant – A date, or Null without tasks.

Remarks

Read-only.

Code example

None

Inheritance

Declared by WklGantt.

ProjectFinish property

Signature

Property Get ProjectFinish() As Variant

Summary

Returns the latest finish of all tasks.

Parameters

None

Property value: Variant – A date as the table stores it, or Null without tasks.

Remarks

Read-only.

Code example

None

Inheritance

Declared by WklGantt.

TaskKind property

Signature

Property Get TaskKind(ByVal Key As Variant) As WklGanttTaskKind

Summary

Returns what the row of a task shows.

Parameters

NameTypeOptionalDefaultDescription
KeyVariantNo–The key of the task.

Property value: `WklGanttTaskKind` – A `WklGanttTaskKind` constant.

Remarks

Read-only.

Code example

None

Inheritance

Declared by WklGantt.

ExportToImage method

Signature

Sub ExportToImage(ByVal Path As String, Optional ByVal Range As WklGanttExportRange = wgrProject, Optional ByVal AutoStart As Boolean = False)

Summary

Exports the chart, task list and timeline, as a picture.

Parameters

NameTypeOptionalDefaultDescription
PathStringNo–The file path; the extension selects the format (.png, the default without extension, .jpg, .bmp, .gif, .tif). A relative path is resolved against the folder of the database.
Range`WklGanttExportRange`YeswgrProjectThe period to export; default wgrProject.
AutoStartBooleanYesFalseTrue to open the file afterwards.

Remarks

The picture shows all records the list shows (expanded nodes, filter) and all its columns, at the screen size of 96 dpi. wgrProject covers ChartStart to ChartFinish, or the first start to the last finish, with a margin as in the form; wgrVisible covers the period the timeline of the open form shows. A picture larger than 60 million pixels is refused with wkeInvalidValue; choose a coarser Zoom, a shorter period or ExportToPdf. An unknown extension raises wkeInvalidValue.

Code example

None

Inheritance

Declared by WklGantt.

ExportToPdf method

Signature

Sub ExportToPdf(ByVal Path As String, Optional ByVal Range As WklGanttExportRange = wgrProject, Optional ByVal AutoStart As Boolean = False)

Summary

Exports the chart as a PDF document on A4 pages in landscape.

Parameters

NameTypeOptionalDefaultDescription
PathStringNo–The file path; .pdf is added without extension. A relative path is resolved against the folder of the database.
Range`WklGanttExportRange`YeswgrProjectThe period to export; default wgrProject.
AutoStartBooleanYesFalseTrue to open the file afterwards.

Remarks

The chart is drawn up to twice the screen resolution and made smaller, down to half the screen size, until its width fits the page. A wider chart continues on further pages to the right, with the task list repeated when it takes at most half a page. Pages go down first, then across; every page repeats the header, and each page has a footer with the control's name, the page number and the date. The text is part of the picture: it prints sharply but cannot be searched or copied. The period follows Range as in ExportToImage.

Code example

None

Inheritance

Declared by WklGantt.

ExportToProject method

Signature

Sub ExportToProject(ByVal Path As String, Optional ByVal AutoStart As Boolean = False)

Summary

Exports the plan as Microsoft Project XML, a file Microsoft Project opens.

Parameters

NameTypeOptionalDefaultDescription
PathStringNo–The file path; .xml is added without extension. A relative path is resolved against the folder of the database.
AutoStartBooleanYesFalseTrue to open the file afterwards (Windows opens .xml with its default program, usually not Project).

Remarks

The file contains all tasks in the order of the list, also collapsed and filtered ones, with outline, start, finish, duration, progress, milestones, constraints, deadlines and baselines; the dependencies with type and lag; the calendar with its working days, working hours and free days; and the resources with their assignments. When every key is a whole number from 1 to 2 147 483 647 (a Long or AutoNumber key field), the key becomes the task's unique ID in Project, so a later import finds the records again; otherwise the tasks are numbered in order.

When ProjectUidField is set, a UID stored there wins, and tasks without one get new UIDs above the highest.

Project schedules every task of the file automatically. To keep the dates of the chart, a task without constraint is written with „Start No Earlier Than“ its own start; a task that breaks a dependency in wgsManual moves in Project. Split tasks are written from their first to their last part, and the look of the chart (colors, bar styles) is not part of the XML format. The file follows the Project 2007 XML schema, which later versions of Project read as well.

Code example

With Me!Gantt1.Object
    .ExportToXlsx "Plan.xlsx", wemWysiwyg
    .ExportToPdf "Plan.pdf", wgrProject, True
    .ExportToProject "Plan.xml"
End With

Inheritance

Declared by WklGantt.

ProjectUidField property

Signature

Property Get ProjectUidField() As String
Property Let ProjectUidField(RHS As String)

Summary

Gets or sets the field that holds the unique ID (UID) of each task in Microsoft Project.

Parameters

None

Property value: String – The field name; empty (default) when the key is the UID.

Remarks

A number field (Long). ImportFromProject fills it for every task it writes and, with wgiAuto or wgiUidField, finds the records by it; ExportToProject writes the stored UID back. Set it before the first import of a plan made in Project: the records then keep the UIDs of the file, whatever keys the table gives them.

Read/write.

Code example

None

Inheritance

Declared by WklGantt.

ImportFromProject method

Signature

Function ImportFromProject(ByVal Path As String, Optional ByVal MatchBy As WklGanttImportMatch = wgiAuto, Optional ByVal DeleteMissing As Boolean = False, Optional ByVal ShowDialog As Boolean = False) As Long

Summary

Reads a Microsoft Project XML file and writes its tasks, dependencies and resource assignments into the tables, by matching.

Parameters

NameTypeOptionalDefaultDescription
PathStringNo–The file path; .xml is added without extension. A relative path is resolved against the folder of the database.
MatchBy`WklGanttImportMatch`YeswgiAutoHow the tasks find their records; default wgiAuto.
DeleteMissingBooleanYesFalseTrue to delete the records no task of the file found, with their dependencies, assignments and segments.
ShowDialogBooleanYesFalseTrue to show the import dialog first; nothing is written when the user cancels.

Return value: Long

Remarks

A task of the file that finds its record (see WklGanttImportMatch) writes its name, start, finish (or duration), progress, milestone, constraint, deadline and baseline into the mapped fields and moves to its summary task (ParentField), where these differ; a task without record is added. Summary tasks write their name only, because their dates and progress follow their subtasks. Dependencies of the file are added or rewritten in DependencySource or the predecessor text; resource assignments in the resource text or in AssignmentSource, where a resource of the file is found by name or added to ResourceSource. Free days of the file's calendar are added to HolidaySource. Working days and hours are properties of the form and are not imported; the dialog says when they differ.

Without DeleteMissing nothing is deleted: records the file does not have stay, and so do dependencies and assignments the file does not name. Everything is written in one transaction; an error writes nothing and raises the error. By code the import raises no BeforeUpdate/AfterUpdate; from the dialog every record raises them as an edit of the user.

A new record gets its key from the database (AutoNumber) or, for a number key, the UID of the task when it is free, otherwise the next free number; then importing the same file again finds the record even without ProjectUidField. New records need a key of one field; with a composite key assign every task to a record in the dialog.

The dialog lists every task with its status (new, change, same), its dates and the changed fields, and the records the file does not have. Choose another rule for the whole file, another record for a task (a record belongs to one task), clear „Take over“ for tasks to leave out, and check „Delete tasks missing in the file“ to delete the listed records.

Code example

With Me!Gantt1.Object
    .ProjectUidField = "ProjektUID"
    ' First import of a plan made in Project: by name, check it in the dialog.
    .ImportFromProject "Umzug.xml", wgiName, False, True
    ' Later imports of the same file find their records by the stored UID.
    Debug.Print .ImportFromProject("Move.xml") & " tasks changed"
End With

Inheritance

Declared by WklGantt.

IndentTask method

Signature

Sub IndentTask(ByVal Key As Variant)

Summary

Indents a task: it becomes the last subtask of the task before it on its level.

Parameters

NameTypeOptionalDefaultDescription
KeyVariantNo–The key of the task.

Remarks

Writes ParentField, as Alt+Shift+Right and Indent in the shortcut menu do (they raise NodeDrop, AfterNodeDrop and BeforeUpdate/AfterUpdate; by code none). The task before it becomes a summary task; with UpdateSummaries its computed dates are written. A task without a task before it on its level raises wkeInvalidValue.

Code example

None

Inheritance

Declared by WklGantt.

OutdentTask method

Signature

Sub OutdentTask(ByVal Key As Variant)

Summary

Outdents a task: it follows its summary task on the summary's level.

Parameters

NameTypeOptionalDefaultDescription
KeyVariantNo–The key of the task.

Remarks

Moves the task with its own subtasks; the tasks after it stay under the summary task (unlike Microsoft Project, which would move them along, because records the user did not select are not changed). A task on the top level raises wkeInvalidValue.

Code example

None

Inheritance

Declared by WklGantt.

BeforeTaskChange event

Signature

Event BeforeTaskChange(ByVal Key As Variant, ByRef Start As Variant, ByRef Finish As Variant, ByRef Progress As Variant, ByRef Cancel As Integer)

Summary

Occurs before the user changes a task by dragging, in the grid or by the progress handle.

Parameters

NameTypeOptionalDefaultDescription
KeyVariantNo–The key of the task.
StartVariant (by reference)No–The new start; can be changed.
FinishVariant (by reference)No–The new finish; can be changed.
ProgressVariant (by reference)No–The new progress; can be changed.
CancelInteger (by reference)No–Set to True to discard the change.

Remarks

In a form module: Private Sub <ControlName>_BeforeTaskChange(...). Parameters passed by reference can be changed by the procedure.

Code example

None

Inheritance

Declared by WklGantt.

AfterTaskChange event

Signature

Event AfterTaskChange(ByVal Key As Variant)

Summary

Occurs after the user changed a task and it was written.

Parameters

NameTypeOptionalDefaultDescription
KeyVariantNo–The key of the task.

Remarks

In a form module: Private Sub <ControlName>_AfterTaskChange(...). Parameters passed by reference can be changed by the procedure.

Code example

None

Inheritance

Declared by WklGantt.

BeforeLinkAdd event

Signature

Event BeforeLinkAdd(ByVal Predecessor As Variant, ByVal Successor As Variant, ByRef LinkType As Long, ByRef Lag As Double, ByRef Cancel As Integer)

Summary

Occurs before the user adds a dependency.

Parameters

NameTypeOptionalDefaultDescription
PredecessorVariantNo–The key of the predecessor.
SuccessorVariantNo–The key of the successor.
LinkTypeLong (by reference)No–The type; can be changed.
LagDouble (by reference)No–The lag; can be changed.
CancelInteger (by reference)No–Set to True to discard the dependency.

Remarks

In a form module: Private Sub <ControlName>_BeforeLinkAdd(...). Parameters passed by reference can be changed by the procedure.

Code example

None

Inheritance

Declared by WklGantt.

AfterLinkAdd event

Signature

Event AfterLinkAdd(ByVal Predecessor As Variant, ByVal Successor As Variant)

Summary

Occurs after the user added a dependency and it was written.

Parameters

NameTypeOptionalDefaultDescription
PredecessorVariantNo–The key of the predecessor.
SuccessorVariantNo–The key of the successor.

Remarks

In a form module: Private Sub <ControlName>_AfterLinkAdd(...). Parameters passed by reference can be changed by the procedure.

Code example

None

Inheritance

Declared by WklGantt.

BeforeLinkDelete event

Signature

Event BeforeLinkDelete(ByVal Predecessor As Variant, ByVal Successor As Variant, ByRef Cancel As Integer)

Summary

Occurs before the user deletes a dependency.

Parameters

NameTypeOptionalDefaultDescription
PredecessorVariantNo–The key of the predecessor.
SuccessorVariantNo–The key of the successor.
CancelInteger (by reference)No–Set to True to keep the dependency.

Remarks

In a form module: Private Sub <ControlName>_BeforeLinkDelete(...). Parameters passed by reference can be changed by the procedure.

Code example

None

Inheritance

Declared by WklGantt.

AfterLinkDelete event

Signature

Event AfterLinkDelete(ByVal Predecessor As Variant, ByVal Successor As Variant)

Summary

Occurs after the user deleted a dependency.

Parameters

NameTypeOptionalDefaultDescription
PredecessorVariantNo–The key of the predecessor.
SuccessorVariantNo–The key of the successor.

Remarks

In a form module: Private Sub <ControlName>_AfterLinkDelete(...). Parameters passed by reference can be changed by the procedure.

Code example

None

Inheritance

Declared by WklGantt.

TaskClick event

Signature

Event TaskClick(ByVal Key As Variant)

Summary

Occurs when the user clicks a bar.

Parameters

NameTypeOptionalDefaultDescription
KeyVariantNo–The key of the task.

Remarks

In a form module: Private Sub <ControlName>_TaskClick(...). Parameters passed by reference can be changed by the procedure.

Code example

None

Inheritance

Declared by WklGantt.

TaskDblClick event

Signature

Event TaskDblClick(ByVal Key As Variant)

Summary

Occurs when the user double-clicks a bar.

Parameters

NameTypeOptionalDefaultDescription
KeyVariantNo–The key of the task.

Remarks

In a form module: Private Sub <ControlName>_TaskDblClick(...). Parameters passed by reference can be changed by the procedure.

Code example

None

Inheritance

Declared by WklGantt.

en/wiki/msaccess/comctl/api-reference/wklgantt.txt · Zuletzt geändert: von Wolfgang van der Stille