TextBox formatting

J

Jerry Bodoff

Hi,

I am using Word 2000 and have created a VBA form to do
field validations and corrections. On the form I have a
TextBox that contains a data definition in the format of:

AAAA - BBBB , CCCC - DDDD

In the macro there is a routine that validates the data
and displays an error list. In addition to the error
list I would like to hilight the fields in error. For
instance, if the relationship between BBBB and DDDD is in
error I wish to hilight only the BBBB and DDDD fields.
Using SelStart and SelLength I am able to hilight only
one of the fields. Is there a way to hilight both fields?
I have looked at the KnowledgeBase and at API's but
cannot seem to find anything.

Any help would be appreciated.

Jerry B.
 
J

Jay Freedman

Hi, Jerry,

Are we talking here about a *single* text field with that entire string in
it? If so, then you lose -- there's no way to have more than one portion of
a text field selected at one time. You would have to prepare the form with
two (or maybe four) separate text fields.
 
J

Jerry Bodoff

Hi Jay,

Thanks for the reply. I guess I lose. It is a single
text string in one TextBox.

I thought I could use an RTF control (then I could change
text colors) but it seems that you have to be licensed to
use it. Oh well, back to the drawing board to come up
with another way.

Once again, thanks for the reply.

Jerry B.
 

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