![]() |
Text box Scroll bar position
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 |
Text box Scroll bar position
Try something like:
TextBox1.SelStart = 0 -- Jim Rech Excel MVP "Vinay" wrote in message om... | 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 |
Text box Scroll bar position
Vinay,
This should work: Private Sub UserForm_Initialize() Me.TextBox1.SelStart = 0 End Sub hth, Doug "Vinay" wrote in message om... 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 |
All times are GMT +1. The time now is 06:50 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com