I am using the MSFlexgrid and I am trying to capture the Keycode when the user hits the arrow keys on the keyboard but I notice that when the keys are used it does not fire the KeyPress or the KeyDown Events and I am not sure how to capture those keys. I also tried the LeaveCell() event also but I am not able to capture the event.

Here is a sample of my code:
for some reason it will not capture the keydown code.


Private Sub MSFlexGrid1_LeaveCell()
Dim KeyAscii As Integer

If Not MSFlexGrid1.Text > CStr(0) Then
MSFlexGrid1.Text = ""
End If
MSFlexGrid1 = Format$(MSFlexGrid1, "0.00") 'or whatever format
MSFlexGrid1.CellBackColor = &H80000005 'white
Select Case KeyAscii
Case vbKeyDown
With MSFlexGrid1
mlCellLeft = .CellLeft
mlCellTop = .CellTop
mlCellWidth = .CellWidth
mlCellHeight = .CellHeight
VScroll1.Visible = True
VScroll1.Left = mlCellLeft + 1480
VScroll1.Height = mlCellHeight
VScroll1.Top = mlCellTop + .Top + 20
End With
End Select
End Sub