VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Function to Move current Row to Grid According to key Pressed - This function will check what the k

by Raghuraja. C (21 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 17th February 2005
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Function to Move current Row to Grid According to key Pressed - This function will check what the key user pressed and find in the Grid, If

Rate Function to Move current Row to Grid According to key Pressed - This function will check what the k



'This is pocedurce for to navigate in the list whent the user press any key
    On Error GoTo LOCALERRORHANDLER
    Dim intRow      As Integer
    Dim intStartRow As Integer
    Dim blnFlag     As Boolean
    '-----------------------------
    If Obj.Rows = 1 Then Exit Function
    If Obj.Row <> Obj.Rows - 1 Then
       intStartRow = Obj.Row + 1
    Else
       intStartRow = 1
    End If
    '-----------------------------
    For intRow = intStartRow To Obj.Rows - 1
       If UCase(Chr(KeyAscii)) = UCase(Left(Trim(Obj.TextMatrix(intRow, intCol)), 1)) Then
          Obj.TopRow = intRow
          Obj.Row = intRow
          Obj.ColSel = Obj.Cols - 1
          Exit Function
       Else
          blnFlag = True
       End If
    Next intRow
    '-----------------------------
    If blnFlag = False Then
        Exit Function
    End If
    '-----------------------------
    For intRow = 1 To intStartRow - 1
       If UCase(Chr(KeyAscii)) = UCase(Left(Trim(Obj.TextMatrix(intRow, intCol)), 1)) Then
          Obj.TopRow = intRow
          Obj.Row = intRow
          Obj.ColSel = Obj.Cols - 1
          Exit For
       End If
    Next intRow
LOCALERRORHANDLER:
End Function

Download this snippet    Add to My Saved Code

Function to Move current Row to Grid According to key Pressed - This function will check what the k Comments

No comments have been posted about Function to Move current Row to Grid According to key Pressed - This function will check what the k. Why not be the first to post a comment about Function to Move current Row to Grid According to key Pressed - This function will check what the k.

Post your comment

Subject:
Message:
0/1000 characters