• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 303
  • Last Modified:

How to make Rich Text Box auto-scroll to bottom

I have a Rich Text Box on a form.
I have a REFRESH button that does RichTextBox1.FileName = "r:\user\general\urlloc\urlloc3.txt"
It refreshes, but always leaves me at the TOP of the file. I want it to put me at the end./??
0
a6106a
Asked:
a6106a
1 Solution
 
mark2150Commented:
change the .selstart location to len(rtb1.text)

M
0
 
Erick37Commented:
Private Sub Command1_Click()
    RichTextBox1.LoadFile "c:\bootlog.txt", rtfText
    RichTextBox1.SelStart = Len(RichTextBox1.Text)
End Sub
0
 
a6106aAuthor Commented:
mark2150 had it first. Thanks guys
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now