bradyboyy88
Well-known Member
- Joined
- Feb 25, 2015
- Messages
- 562
Basically I have a parent frame that has a vertical scroll and a child frame inside of it. I need it such that when I scroll the parent frame scroll bar the parent frame does not actually scroll its body but instead scrolls the child frame. I am able to get this working except i use actualdy to keep the frame from moving but when i do that the scroll bar does not move. Is there a way to just use the scroll bar and cancel out the changes in the movement?
Here is my code so far:
Here is my code so far:
Code:
Public Sub ParentFrame_Scroll(ByVal ActionX As MSForms.fmScrollAction, ByVal ActionY As MSForms.fmScrollAction, ByVal RequestDx As Single, ByVal RequestDy As Single, ByVal ActualDx As MSForms.ReturnSingle, ByVal ActualDy As MSForms.ReturnSingle)
Debug.Print "ActionX:" & ActionX & " ActionY:" & ActionY & " RequestDx:" & RequestDx & " RequestDy:" & RequestDy & " ActualDx:" & ActualDx & " ActualDy:" & ActualDy
If ActionY = fmScrollActionFocusRequest Or ActionY = fmScrollActionControlRequest Then
ActualDy.value = 0
End If
MMCARMS.ChildFrame.ScrollTop = MMCARMS.ChildFrame.ScrollTop + RequestDy
ActualDy.value = 0
End Sub