Example
Using the Find Method.
Using the Find Method code snippet.
The following is a simple example of how to use the Find Method. The Find Method searches only the column of the active cell.
Public schtxt As String 'Search text
Public schup As Boolean 'Search Up=True, Down=False
Public mcase As Boolean 'Match case=True, no match=False
Public mtype As dgMTypeConstants
'
'
'
Dim ret as Long
'Display a dialog box to collect search variables
'Call the Find Method using the variables
ret = DGrid1.Find(schtxt, schup, mcase, mtype)
'Check the return value.
'-1 if BOF or EOF is reached, -2 if the search was canceled, -3 if a read
'error occurs, or the row number of the found record.