Text box Scroll bar position

  • Thread starter Thread starter Vinay
  • Start date Start date
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
 
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
 
Vinay,

This should work:

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

hth,

Doug
 
Back
Top