Scrolling a TextBox in code

A

Andrew Ketley

Does anybody know any good ways of scrolling a TextBox in code? I have been
using the SelStart property to move the cursor around, but as SelStart takes
an Integer argument, it's not a lot of help if you have more than 32768
characters in the TextBox - which I frequently do.

I'm using Access 2002 under XP SP2. The help entry for SelStart states that
the property takes a Long, but I always get an error with values larger than
an Integer.
 
M

Marshall Barton

Andrew said:
Does anybody know any good ways of scrolling a TextBox in code? I have been
using the SelStart property to move the cursor around, but as SelStart takes
an Integer argument, it's not a lot of help if you have more than 32768
characters in the TextBox - which I frequently do.

I'm using Access 2002 under XP SP2. The help entry for SelStart states that
the property takes a Long, but I always get an error with values larger than
an Integer.

You might have to use API code to do this. Take a look at
http://www.lebans.com/setgetsb.htm for an example of
manipulating a vertical scroll bar. You'll have to modify
it for a text box instead of a form, but I think(?) the
essence of what you need is in there.
 

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