Controlling scrollbars in textbox

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
 
J

Jim/Chris

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



------------------------------------------------
 
R

robbinma

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
 

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