So I have a form which is slighlty longer than the screen so I use the mouse scroll to go up and down in my form.
I also have a textbox which has scrollbar set to vertical.
I'm trying to come up with a way to scroll the textbox when focus is on (or when I hover with the mouse).
I tried this little bit of code I found online :
Code:
Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
Dim i As Long
Dim s As String
If Me.ActiveControl.Name = "NOTES" Then
If Count > 0 Then
For i = 1 To Count
s = s & "{DOWN}"
Next i
Else
For i = 1 To -Count
s = s & "{UP}"
Next i
End If
SendKeys s
End If
End Sub
But it cause the form to jump up and down.
Any solutions?