?
Solved

Scroll bar default is top

Posted on 2014-03-13
6
Medium Priority
?
223 Views
Last Modified: 2014-03-13
Folks,
I have a large text box with a vertical scroll bar in a multi-line format.
When the text box opens I'd like it to open by default at the top and then scroll down, not up.
0
Comment
Question by:Frank Freese
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 10

Expert Comment

by:etech0
ID: 39927508
What do you mean by "when the text  box opens"?
Doesn't it always default to the top?
0
 

Author Comment

by:Frank Freese
ID: 39927546
I call a form that had the text box using a command button. When the form opens with the text box is there as well as the vertical scroll bar but the text box is not at the top. I've made sure that the property ScrollTop of the form set to zero.
0
 
LVL 10

Expert Comment

by:etech0
ID: 39927554
Interesting - I would have to see a sample db to diagnose it...
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Frank Freese
ID: 39927591
OK...here the worksheet with the form
Book1.xlsm
0
 
LVL 23

Accepted Solution

by:
Ejgil Hedegaard earned 2000 total points
ID: 39927769
Insert this in the userform code window

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

Open in new window

0
 

Author Closing Comment

by:Frank Freese
ID: 39927821
thanks,
you nailed it!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question