How to copy the slected text in a text box

M

Marco

Hello.

I want to make some changes in the selected text in a text box.

Imagine that I have this text in a text box:
"The Web Server may be down, too busy, or experiencing other problems
preventing it from responding to requests. You may wish to try again at a
later time. "

Imagine that I select some part of text and in the selected area I want to
add the folowing codes: <b> </b>

In the example, imagine that I select "Web Server", I want to press a button
and add the codes to that text in order to get this:

"The <b>Web Server</b> may be down, too busy, or experiencing other problems
preventing it from responding to requests. You may wish to try again at a
later time. "

Please help,
Marco
 
M

Marshall Barton

Marco said:
I want to make some changes in the selected text in a text box.

Imagine that I have this text in a text box:
"The Web Server may be down, too busy, or experiencing other problems
preventing it from responding to requests. You may wish to try again at a
later time. "

Imagine that I select some part of text and in the selected area I want to
add the folowing codes: <b> </b>

In the example, imagine that I select "Web Server", I want to press a button
and add the codes to that text in order to get this:

"The <b>Web Server</b> may be down, too busy, or experiencing other problems
preventing it from responding to requests. You may wish to try again at a
later time. "


Imagine that my test scenario is the same as yours ;-)

I did that by using:
Me.Text0.SelText = "<b>" & Me.Text0.SelText & "</b>"
in the text box's Exit event procedure.
 

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