Scroll Frame after user event

L

Limey

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.
 
O

okrob

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.
 
L

Limey

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top