Text box Scroll bar position

V

Vinay

Hello:
I would appreciate help with the following.

I have created an user form with text box that contains about 3
paragraphs of text. I have set the scrollbar property to show vertical
scroll bars.

When I open the form, the scroll bar position is at the bottom i.e the
last line of text is displayed in the text box. What can I do so that
the scroll bar always starts at the top and the first line of text is
displayed whenever the form is opened?

TIA

Vinay
 
J

Jim Rech

Try something like:

TextBox1.SelStart = 0

--
Jim Rech
Excel MVP
| Hello:
| I would appreciate help with the following.
|
| I have created an user form with text box that contains about 3
| paragraphs of text. I have set the scrollbar property to show vertical
| scroll bars.
|
| When I open the form, the scroll bar position is at the bottom i.e the
| last line of text is displayed in the text box. What can I do so that
| the scroll bar always starts at the top and the first line of text is
| displayed whenever the form is opened?
|
| TIA
|
| Vinay
 
D

Doug Glancy

Vinay,

This should work:

Private Sub UserForm_Initialize()
Me.TextBox1.SelStart = 0
End Sub

hth,

Doug
 

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