How do I set the scrollbar position of a frame(inside an userform)?
The case:
I have a frame in an userform that has dynamic content. So if the content is too big to fit the frame, it (dynamically) creates a scrollbar in that frame. The scrollbar also has dynamic values, following the frame content size.
The code that updates the scrollbar is as follows:
With userform1.frame1
'dynamic size
.ScrollHeight = param1 * param2
.ScrollWidth = .InsideWidth * 30
End with
So I'd like to have something to send the scrollbar to the bottom position! How do I do that? Thanks in advance
After setting the ScrollHeight and ScrollWidth and still inside the With
block try:
.Scroll ActionX:=fmScrollActionNoChange, ActionY:=fmScrollActionEnd
More details can be found here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With