Scrolling a TextBox in code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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