Link to home
Start Free TrialLog in
Avatar of Roger
RogerFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Excel userform: for a vertical scrollbar in a frame control, how to use vba to set the position of the scrollbar SLIDER, to my required position?

I have a frame which contains quite a lot of detail, and which has a vertical scrollbar. I want to set the scroll position of the frame, so that the most important content is visible to the user (at the bottom of the frame's scroll-able content), before the user scrolls away to other details in the frame.

I use vba.

I'd settle for presetting the slider to the bottom or top of the scollbar, but would be interested to know if I can pre-position it to any vertical position.

Thanks
Kelvin
ASKER CERTIFIED SOLUTION
Avatar of byundt
byundt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Roger

ASKER

@byundt's code worked first time for me, and I added some textBox controls to frame1 to demonstrate the ability to change which textBoxes are visible when the scrollBar position is automatically changed by clicking the cmd button provided in the original solution.
Control-position-of-scroll-slider-v.xlsm
Avatar of Roger

ASKER

Thanks again: for another rapid and total solution.
I added some textBoxes to Frame1 to show the scroll control in action, and attached the excel file to an EE comment beneath your solution.
Kelvin