Dim SearchStr As String 'Get one character from left SearchStr = Left(txtSearchStr.Text, 1) While (SearchStr <> "") 'If is numeric then no problem increase the number and search If IsNumeric(SearchStr) Then SearchStr = Val(SearchStr) + 1 Search(SearchStr) Else 'If alphabet Dim ASCII As Integer 'Get the ascii value ASCII = AscW(SearchStr) 'Increase by one and again search for the character SearchStr = ChrW(ASCII + 1) Search(SearchStr) End If End While
Sub Search(ByVal Str As String) 'Check for the character in Grid or in Dataset by loop through the datasetEnd Sub