Well you declare KeyAscii as an integer in the event but you never give it a value so in the Select Case statement KeyAscii will be zero.
Try this instead:
Code:
Private Declare Function GetAsyncKeyState _
Lib "user32" ( _
ByVal vKey As Long) As Integer
Private Sub MSFlexGrid1_LeaveCell()
If Not MSFlexGrid1.Text > CStr(0) Then
MSFlexGrid1.Text = ""
End If
MSFlexGrid1 = Format$(MSFlexGrid1, "0.00") 'or whatever format
MSFlexGrid1.CellBackColor = &H80000005 'white
If GetAsyncKeyState(vbKeyDown) Then
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 If
End Sub
Good luck!