Micro Focus QTP (UFT) Forums
Searching for and selecting row in Datawindow - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Searching for and selecting row in Datawindow (/Thread-Searching-for-and-selecting-row-in-Datawindow)



Searching for and selecting row in Datawindow - zsl0009 - 08-04-2015

In my datawindow, I have a column named Code. I’m attempting to locate the cell in that Code column that says GEBRTS, then have the script activate that cell for me. Forgive my newness, trying to give what info I can.

my first attempt:

Code:
For row = 1 to PbWindow("lems"). PbWindow("elect").PbDataWindow("select").RowCount
If PbWindow("lems"). PbWindow("elect").PbDataWindow("select").GetCellData (row,col) = "GEBERTS" Then
Exit For
End If
Next


It runs and local variables show:

Name Value Type Name
Row 23 Long
Col Empty User-defined Type

Any thoughts or ideas for me?
Thanks!