Vertical Scroll bar position in Text box

M

Maria

Hello:
I would appreciate help with the following:
I have a userform with a text box which has a vertical scroll bar.
When I open the form, I find that the vertical scroll bar position is
somewhat midway between top & bottom. This results in the first line of text
not be visible right away (of course on using the scroll bar I can go to the
top). To the user the text message is somewhat confusing since it does not
display the first line

Is there a way to always open the form with the vertical scroll bar in the
topmost position

Thanks a lot
 
B

Bill Manville

Maria said:
Is there a way to always open the form with the vertical scroll bar in the
topmost position

Try

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

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - reply in newsgroup
 
M

Maria

Thanks a lot Bill
Worked perfectly

Maria
-------------------------------------------------------
 

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