ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Scroll Frame after user event (https://www.excelbanter.com/excel-programming/386575-scroll-frame-after-user-event.html)

Limey

Scroll Frame after user event
 
Hi,
thanks in advance for any help I receive.
I have a userform with a frame that has the vertical scrollbar
visible. Inside the frame are a number of textboxes, (10), all but the
first two are set to invisible. When the user clicks inside of the
second text box, the third becomes visible, clicking the third the
forth becomes visible etc. All is good so far, and I have this part
working beautifully. What is driving me mad, is that I would like as
the next textbox becomes visible, to scroll the focused control to the
top of the frame, fully revealing the next control.
I seem to be tripping up on what seems should be a simple thing.


okrob

Scroll Frame after user event
 
On Mar 30, 12:12 pm, "Limey" wrote:
Hi,
thanks in advance for any help I receive.
I have a userform with a frame that has the vertical scrollbar
visible. Inside the frame are a number of textboxes, (10), all but the
first two are set to invisible. When the user clicks inside of the
second text box, the third becomes visible, clicking the third the
forth becomes visible etc. All is good so far, and I have this part
working beautifully. What is driving me mad, is that I would like as
the next textbox becomes visible, to scroll the focused control to the
top of the frame, fully revealing the next control.
I seem to be tripping up on what seems should be a simple thing.


In the past, I have placed something at the bottom of the frame, and
in the code, focused on it then back up on the textbox I really want
to be the focus. That way, it starts at the bottom and works upward.
The box I want focused on, 'rises' to the top.
I'm not sure if you can do this with an invisible box at the bottom or
not. You'll have to test.


Limey

Scroll Frame after user event
 
On Mar 30, 10:17 am, "okrob" wrote:
On Mar 30, 12:12 pm, "Limey" wrote:

Hi,
thanks in advance for any help I receive.
I have a userform with a frame that has the vertical scrollbar
visible. Inside the frame are a number of textboxes, (10), all but the
first two are set to invisible. When the user clicks inside of the
second text box, the third becomes visible, clicking the third the
forth becomes visible etc. All is good so far, and I have this part
working beautifully. What is driving me mad, is that I would like as
the next textbox becomes visible, to scroll the focused control to the
top of the frame, fully revealing the next control.
I seem to be tripping up on what seems should be a simple thing.


In the past, I have placed something at the bottom of the frame, and
in the code, focused on it then back up on the textbox I really want
to be the focus. That way, it starts at the bottom and works upward.
The box I want focused on, 'rises' to the top.
I'm not sure if you can do this with an invisible box at the bottom or
not. You'll have to test.


Thanks for the help Rob, I'll give it a try, just weird that you can't
set a breakpoint on the form like you can with an Access form. I
suppose only Microsoft know the answer to that one. ;)))
Cheers



All times are GMT +1. The time now is 05:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com