String in text box

K

kirkm

I'm building up a rather complex string
and displaying it in a text box.

The text box is a fixed size, which is fine
as most outputs don't fill it. But when it
does, you see the last line and a cursor.

It'd be better is you could see the first line.

Is that possible?

Thanks - Kirk
 
N

NickHK

Kirk,
Check out the .SelStart, .SelText .SelLength properties of the TextBox.

NickHK
 
K

kirkm

Kirk,
Check out the .SelStart, .SelText .SelLength properties of the TextBox.

Hi, I read the Help on those (which didn't make much sense to me).

Tried a few things but nothing worked as hoped - or gave errors.
Stuff about SetFocus and other complications.

Suppose I'll just have to leave the cursor at the end and scroll back
up to read what's at the beginning, Doesn't seem right though.

Cheers - Kirk
 
N

NickHK

Kirk,
Doesn't this work ?

Private Sub CommandButton1_Click()

With TextBox1
.SetFocus
.SelStart = 0
End With

End Sub

NickHK
 
K

kirkm

Kirk,
Doesn't this work ?

Private Sub CommandButton1_Click()

With TextBox1
.SetFocus
.SelStart = 0
End With

End Sub

Thanks Nick. All sorted now.

Cheers - Kirk
 

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