Character selection in two 2 ΤextBoxes

alexander156

New member
Local time
Today, 09:09
Joined
Apr 1, 2012
Messages
9
Hello!!!
I want a help.
In the form that upped: when I select some words in Textbox1 want to be the choice of words in textbox2 .
The best avatars those letters are selected in the first Textbox1 so be chosen in Textbox2.

Yours sincerely
Alexander
 

Attachments

Can you give an example of what you want to happen in English?
 
As far as I can tell, find text in textbox2 from a selection in textbox1?

Code:
Private seltxt As String

Private Sub TextBox1_LostFocus()
    seltxt = TextBox1.SelText
End Sub

Private Sub btnFind_Click()
    i = InStr(1, TextBox2, seltxt, vbTextCompare) 
    If i Then
        TextBox2.SetFocus
        TextBox2.SelStart = i-1
        TextBox2.SelLength = Len(seltxt)
    End If
End Sub
 
Hello!,
Adjusted the code as you gave me, but when I select the characters (shading) in the first TEXTBOX with the command button does not select the equivalent in TEXTBOX2. can it be done without Shaded single button simultaneously be shading TEXTBOX2?
I Make a dubbing in writing Braili for blind and Iwant to choose Shaded some words in TextBox1 and simultaneously select the corresponding characters in the second.Send the base as a button Command.
 

Attachments

Hi!
I want to shade characters in Textbox1 respectively in TEXTBOX2 with different text because the TEXT BOX2 is dubbed in another font Braille for the Blind.
 
I can't run code from your form at all. It just gives activeX errors. I'm not sure what's causing that but maybe it's why my code didn't work for you. I had to create a new form.

"I want to choose Shaded some words in TextBox1"

Text boxes don't allow multiple selections. If you change the 'Text Format' property to rich text you could add formatting like highlights to the parts of the text that you want to extract/process.

"... and simultaneously select the corresponding characters in the second."

Characters or words?
 
Hi!,
sorry I was not as informative.
Υour code it works only for words when the Textbox1 is the same with the Text box2.
I need the code to work only for characters when the Textbox1 is not the same with the Text box2 .For example the 10th, 11th, 12th, 13th, 14th, 15th characters of textbox1 be selected by their respective characters, to the 11th, 12th, 13th, 14th, 15th of textbox2

Ι Send the form below to work
I have an example with two pictures.
Ιn picture 1 Ι select some characters and in picture 2 with the command button appears selected respective characters.
Sorry about my bad english!!
 

Attachments

  • picture1.jpg
    picture1.jpg
    73.3 KB · Views: 67
  • picture2.jpg
    picture2.jpg
    80.5 KB · Views: 61
  • select.mdb
    select.mdb
    448 KB · Views: 66
Last edited:

Users who are viewing this thread

Back
Top Bottom