UserForm keeps scrolling to a button height?

djr8yk

Board Regular
Joined
May 19, 2015
Messages
58
Hi,
I'll try to ask this without posting any code. Basically, I have a UserForm with many frames, and each frame has a "Next" and "Back" button. Clicking the Next button will show the next frame, while hitting the back button will hide the current frame while enabling the previous one. The previous frames all stay on the screen, they just become disabled once the next button is clicked.
In addition to these frames, there is a "Leave Form" button on this UserForm that always stays in the same position towards the top. For some reason, every time I click "Next" on a frame, if the "Leave Form" button isn't already on the screen, it will automatically scroll to the top of that button. This is annoying, since I want it to maintain the current position, so that the user doesn't have to keep scrolling down to the current frame.
Does anyone have any clue why this might happen? I suspect it's because the button is "Visible", but I have no idea how I'd fix this since I need this button to be present.
Hopefully I explained this decently; let me know if you need clarification at all. Thank you!
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
SOLVED:
The "TabStop" Property was true for the button, and it was the top enabled button on the form. This meant that, no matter where the scroll bar was, it would automatically tab to the button and show it when there were any events (like clicking the Next button).
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,695
Members
448,979
Latest member
DET4492

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top