Scroll Bars in TextBox on UserForm

F

Fred Holmes

Excel 2003

I have a UserForm with several text boxes on it. The contents of the
text boxes is read from cells in the worksheet with a vba statement
such as:

TextBox8.Text = Cells(n, m).Value

The text boxes have scroll bars enabled with a vba statement

TextBox8.ScrollBars = fmScrollBarsBoth

The text boxes are multi-line and wrapping is enabled.

When the text read into the text box overflows the box, the vertical
scroll bar does not appear immediately. It appears only after the
user clicks the mouse inside the text box. And then when the user
does that, the text in the text box "jumps" (moves vertically) in an
apparently unpredictable manner.

The user is simply reading the text in the cell, not editing it. How
can I get the scroll bar to appear immediately when the text read into
the text box overflows the box? And the user can then just use the
scroll bar to read the rest of the text when he has read to the bottom
of the visible text in the box.
 

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