Share via


Application.EditGoTo Method

Project Developer Reference

Scrolls to a resource, task, or date.

Syntax

expression.EditGoTo(ID, Date)

expression   A variable that represents an Application object.

Parameters

Name Required/Optional Data Type Description
ID Optional Long A number that specifies the identification number of the task or resource to display in the active pane.
Date Optional Variant A number or string that specifies the first date to display in the active pane.

Return Value
Boolean

Example
The following example prompts the user for a date or a task name, and then scrolls to that date or task in the active pane. It assumes the user is in a task view.

Visual Basic for Applications
  Sub PromptUserForEditGotoArguments()
Dim Entry As String     ' Date or task name entered by user

Entry = InputBox$("Enter a date or a task name to which you want to scroll in the active pane.")

' If user enters a date, scroll to a date in the active pane.
If IsDate(Entry) Then
    <strong class="bterm">EditGoTo</strong> Date:=Entry
' Otherwise, scroll to a task in the active pane.
Else
    <strong class="bterm">EditGoTo</strong> ID:=ActiveProject.Tasks(Entry).ID
End If

End Sub

See Also