String in text box

  • Thread starter Thread starter kirkm
  • Start date Start date
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
 
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
 
Kirk,
Doesn't this work ?

Private Sub CommandButton1_Click()

With TextBox1
.SetFocus
.SelStart = 0
End With

End Sub

NickHK
 
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
 
Back
Top