|
-
Aug 25th, 2006, 10:28 AM
#1
Thread Starter
Fanatic Member
Search Data in MS FLEXGRID
Hello
I have about 100 rows in a grid having Names, I want to search in MS FLEXGRID like THOMAS which is the 68th row, How can i do this ? Please help me
-
Aug 25th, 2006, 10:35 AM
#2
Re: Search Data in MS FLEXGRID
VB Code:
Dim lngRow as Long
Dim blnFound as Boolean
blnFound = False
For lngRow = 0 To MSFlexGrid.Rows - 1
If MSFlexGrid.TextMatrix(lngRow, 0) = "THOMAS" Then 'change 0 to the correct column #
blnFound = True
Exit For
End If
Next
If blnFound Then
debug.print "Found on Row " & lngRow
Else
Debug.print "Not Found"
End If
-
Aug 25th, 2006, 03:28 PM
#3
Thread Starter
Fanatic Member
Re: Search Data in MS FLEXGRID
Thanks.
But how to automatically select that row ?
-
Aug 25th, 2006, 04:21 PM
#4
Re: Search Data in MS FLEXGRID
VB Code:
Dim lngRow as Long
Dim blnFound as Boolean
blnFound = False
For lngRow = 0 To MSFlexGrid.Rows - 1
If MSFlexGrid.TextMatrix(lngRow, 0) = "THOMAS" Then 'change 0 to the correct column #
blnFound = True
Exit For
End If
Next
If blnFound Then
MSFlexGrid.Row = lngRow 'sets the current Row
MSFlexGrid.TopRow = lngRow 'moves the row into view
Else
Debug.print "Not Found"
End If
-
Aug 25th, 2006, 04:35 PM
#5
Thread Starter
Fanatic Member
Re: Search Data in MS FLEXGRID
Thaks brucevde , I solved
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|