Question about the TextBox control

T

Tox

Windows XP SP2
Excel 2002 SP3

I have a textbox on a userform, and it gets populated with road names. I
use the vbCrLf keyword to put each road name on a new line in the textbox.
If the road name list gets too long, a vertical scrollbar is added to the
control. What I want to do is on those occasions when a scrollbar is added,
is to have the scrollbar slider positioned all the way at the top when all
is said and done. This way the first road name is always visible.

FYI, the userform isn't shown until the very end.

-gk-
 
N

NickHK

I suppose you have good reason to use a textbox to mimic a listbox....
Anyway, look into the various .Selxxx properties of the textbox.
You cannot tell (easily) when the scroll bar appears, so just set
..SelStart=0 each time you add to the textbox.

NickHK
 

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