Re: Scrollbars and Keypress
1- You need this API function put in a module
Private Declare Function SendMessageByVal Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Const WM_VSCROLL = &H115
2- also this method
Sub GridScroll(tb As MSFlexGrid, ByVal HorizScroll As Long, ByVal VertScroll As Long)
SendMessageByVal tb.hwnd, WM_VSCROLL, HorizScroll, VertScroll
End Sub
3- In key press if you want to scroll
A- up GridScroll Grid2, 0, 0 'up
B- down GridScroll Grid2, 1, 0 'down
Here I am using a grid control, in your case subtitute for the grid with whatever control you have.
Good Luck!
Thanks
Hisham