Zzz
Zzz

Reputation: 3035

Find Function in QTP

I have been looking online to find documentation for the function in QTP and have not been able to find anything that explains it well. Could someone please help.

The line of code looks like this:

obj_Sheet.UsedRange.Find(Variable_Name,,-4163,1)

Can someone explain to me what the Find() function does, and what parameters it expects.

Thanks you

Upvotes: 0

Views: 2718

Answers (1)

AutomatedChaos
AutomatedChaos

Reputation: 7490

The Find function for Excel VBA is described at MSDN. The easiest way to view the possible values of the properties in Excel VBA editor itself: In Excel: Press ALT+F11 for the VBA editor, then select F2 to open the object browser. In the object browser you can lookup the values for xlPart, xlWhole, xlValues etc.

The parameters in your script mean:
-4163 : xlValues (search in values, not in formula's)
1 : xlWhole (the value in the cell must be matching the lookup value completely, not partly)

Upvotes: 2

Related Questions