Link to home
Start Free TrialLog in
Avatar of ljhodgett
ljhodgett

asked on

Goto last line of a rich text box

Hi Experts,

I have the following code in vb6: -

rch_Test_Steps.Text = rch_Test_Steps.Text & "Scanned Barcode " & Serial_Number & vbCr & vbCr
        rch_Test_Steps.SelStart = Len(rch_Test_Steps.Text) - 1
        rch_Test_Steps.Refresh()

I’m trying to migrate it to vb.net 2005. What the code does is once rch_text_steps is populated it will scroll down to the last line but in vb.net 2005 it comes up with an error saying selstart is not valid.

How do I accomplish this in vb.net please.

Many Thanks
Lee
Avatar of appari
appari
Flag of India image

ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can also append to the end with AppendText():

    rch_Test_Steps.AppendText("Scanned Barcode " & Serial_Number & vbCr & vbCr)