Adding to highlighted text

C

Carlos1815

I have a form where I use symbols like ¤ or ¥ before and after a word
so that it could be recognized in another program that changes the
format of the word between the symbols. That part works just fine.
My question is, if a user highlights a single word in a text box
control, I would like to have a button that places a symbol on either
side of the highlighted word or text. I've seen a few posts that came
close, but they didn't really answer my question. I'm kind of a
beginner with Access 2002, so if anyone has some examples of VB code
they used, that would help. Thank you!

Carlos
 
A

Arvin Meyer [MVP]

I have a form where I use symbols like ¤ or ¥ before and after a word
so that it could be recognized in another program that changes the
format of the word between the symbols. That part works just fine.
My question is, if a user highlights a single word in a text box
control, I would like to have a button that places a symbol on either
side of the highlighted word or text. I've seen a few posts that came
close, but they didn't really answer my question. I'm kind of a
beginner with Access 2002, so if anyone has some examples of VB code
they used, that would help. Thank you!

==================================
I'm not sure that you can do what you want, but I'd investigate the SelStart
and SelLength functions as a possible answer.
 
C

Carlos1815

I have a form where I use symbols like ¤ or ¥ before and after a word
so that it could be recognized in another program that changes the
format of the word between the symbols.  That part works just fine.
My question is, if a user highlights a single word in a text box
control, I would like to have a button that places a symbol on either
side of the highlighted word or text.  I've seen a few posts that came
close, but they didn't really answer my question.  I'm kind of a
beginner with Access 2002, so if anyone has some examples of VB code
they used, that would help.  Thank you!

==================================
I'm not sure that you can do what you want, but I'd investigate the SelStart
and SelLength functions as a possible answer.

Thank you! I'll post my code if I get it working with these functions.
 

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