title | keywords | f1_keywords | ms.service | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|---|
Application.Find method (Project) |
vbapj.chm215 |
|
project-server |
|
0e7b1027-5609-19fa-f100-4eb7b108bae7 |
06/08/2017 |
medium |
Searches for an unfiltered value; returns True if the value is found.
expression.Find (Field, Test, Value, Next, MatchCase, FieldID, TestID)
expression A variable that represents an Application object.
Name | Required/Optional | Data type | Description |
---|---|---|---|
Field | Optional | String | The name of the field to search. |
Test | Optional | String | The type of comparison made between Field and Value. Can be one of the comparison strings. |
Value | Optional | String | The value to compare with the field specified by Field. |
Next | Optional | Boolean | True if Project searches down for the next occurrence of a value that matches the search criteria. False if Project searches up for the next occurrence. The default value is True. |
MatchCase | Optional | Boolean | True if the search is case-sensitive. The default value is False. |
FieldID | Optional | Variant | The field identification number can be one of the PjField constants. FieldID takes precedence over any Field value. |
TestID | Optional | Variant | The test identification number can be one of the PjComparison constants. TestID takes precedence over any Test value. |
Comparison string | Description |
---|---|
"equals" | The value of Field equals Value. |
"does not equal" | The value of Field does not equal Value. |
"is greater than" | The value of Field is greater than Value. |
"is greater than or equal to" | The value of Field is greater than or equal to Value. |
"is less than" | The value of Field is less than Value. |
"is less than or equal to" | The value of Field is less than or equal to Value. |
"is within" | The value of Field is within Value. |
"is not within" | The value of Field is not within Value. |
"contains" | Field contains Value. |
"does not contain" | Field does not contain Value. |
"contains exactly" | Field contains exactly Value. |
Boolean
Using the Find method with no arguments, or without specifying Field, Test, and Value, displays the Find dialog box that has options set for the previous state.
To find a value where you can search all available fields, use the FindEx method.
Either statement in the following example finds the next task with priority = 600.
Sub FindFieldByPriority
Find Field:="Priority", Test:="equals", Value:="600"
Find Field:="xx", Test:="xx", FieldID:=pjTaskPriority, TestID:=pjCompareEquals, Value:="600"
End Sub
[!includeSupport and feedback]