Adding to highlighted text

  • Thread starter Thread starter Carlos1815
  • Start date Start date
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
 
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.
 
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.
 
Back
Top