Scrolling a text box with the mouse wheel

randle

Registered User.
Local time
Today, 18:12
Joined
Jun 16, 2010
Messages
57
Hi,

I'm looking to make a text box scrollable using the mouse wheel.

I know this question is often asked and have found the response is usually "not easily" but I'm half-way there with the following code:
Code:
If Count < 0 Then
      '~~> Replace Textxx with the name of your textbox
      If Screen.ActiveControl.Name = "Text34" Then
          If InStr(Me.Text34, Chr(13)) + 1 < Len(Me.Text34) Then
              Me.Text34.SelStart = Me.Text34.SelStart + InStr(Me.Text34, Chr(13)) + 1
          End If
      End If
   End If
This only scrolls down however so how do I add the functionality to scroll up as well? I've tried a few things that I thought would be obvious but ended up having the same effect.
 

Users who are viewing this thread

Back
Top Bottom