Find Method (ALog)

Finds the given text.

Syntax

[ bFound = ] Object.Find ( sText [, bUp] [, bMatchCase] [, bMatchWholeWord] )

The Find method syntax has the following parts:

 

Name

Type

Description

Object

A control

A control object

sText

Val BString

A string containing the text or pattern the user wants to find.

bUp

Val Variant

A Boolean value specifying whether to search up from the current line toward the top of the file or down toward the bottom.

bMatchCase

Val Variant

A Boolean value specifying whether to match case.

bMatchWholeWord

Val Variant

A Boolean value specifying whether to only match whole words.

bFound

Bool

A Boolean value specifying whether or not the target string was found.

Where

bUp can have one of the following values:

 

Value

Description

True

The search is up.

False *

The search is down.

bMatchCase can have one of the following values:

 

Value

Description

True

The search is case sensitive.

False *

The search is not case sensitive.

bMatchWholeWord can have one of the following values:

 

Value

Description

True

The search only matches whole words.

False *

The search matches partial words.

bFound can have one of the following values:

 

Value

Description

True

The target string was found.

False

The target string was not found.

Example

The following example will search for "Test case 1", searching up in the file from the current line, is case sensitive, matches only whole words, and returns the results in pbCase1Found:

bCase1Found = log1.Find("Test case 1",True,True,True)

Applies to

ALog

See Also

Clear, Copy, Move