Scrolling a Text box on a form

  • Thread starter Thread starter Jonathan
  • Start date Start date
J

Jonathan

Hello all,

I have a text box on a form. The text box is formatted to allow several
lines of text to be visible. Vertical scroll bars are on. I want to update
the text box with progress messages as processing goes forward. I wrote a
small subroutine as follows:



Private Sub SetMsgs(ByVal msg As String)

txtMsgs = txtMsgs & msg & vbCr & vbLf

Me.Repaint

End Sub



Typical calls will be:



SetMsgs "Loading table 1."

SetMsgs "Loading table 2."



This works except that the text box only shows the top few lines and doesn't
scroll down as I add more text.



How can I cause the text box to scroll as I fill it?



Thanks

Jonathan
KingsKinght1 <at> hotmail <dot> com
 
Jonathan said:
Hello all,

I have a text box on a form. The text box is formatted to allow several
lines of text to be visible. Vertical scroll bars are on. I want to update
the text box with progress messages as processing goes forward. I wrote a
small subroutine as follows:



Private Sub SetMsgs(ByVal msg As String)

txtMsgs = txtMsgs & msg & vbCr & vbLf

Me.Repaint

End Sub



Typical calls will be:



SetMsgs "Loading table 1."

SetMsgs "Loading table 2."



This works except that the text box only shows the top few lines and doesn't
scroll down as I add more text.



How can I cause the text box to scroll as I fill it?



Thanks

Jonathan
KingsKinght1 <at> hotmail <dot> com

Add the progress messages to the top instead of the bottom?
 

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

Back
Top