Controlling scrollbars in textbox

  • Thread starter Thread starter robbinma
  • Start date Start date
R

robbinma

Hello,

A logging procedure is adding text to a textbox and I would like to be
able to use VBA to change the positiopn of the scrollbar so that it is
always pointing at the last piece of text in the textbox.

Does anyone know how to do this?
Reading other postings in the word forum the scrollbar control has the
percentscolled(?) property but there doesn't appear to be this property
for the textbox scrollbar.

Any help appreciated.
Regards,

Mark
 
Put this code in the "On Enter" event

'******** Code Start **********
'Code courtesy of
'Terry Wickenden
Private Sub Description_Enter()
me!Description.SelStart = me!Description.SelLength
End Sub
'******** Code End **********

Jim
-----Original Message-----
Hello,

A logging procedure is adding text to a textbox and I would like to be
able to use VBA to change the positiopn of the scrollbar so that it is
always pointing at the last piece of text in the textbox.

Does anyone know how to do this?
Reading other postings in the word forum the scrollbar control has the
percentscolled(?) property but there doesn't appear to be this property
for the textbox scrollbar.

Any help appreciated.
Regards,

Mark



------------------------------------------------
 
Hi,

Using that just makes the whole of the text in the text box selected.
It doesn't make the scrollbar scroll down so that the last piece in the
textbox is always displayed.

Thanks anyway,

Mark
 
Back
Top