hi, greet to everybody
i have a problem with vb6.
I have 2 forms visualized at the same time.
in form1 I have an array of richtextbox1;
in form2 I have an array of richtextbox2;
when I fill richtextbox1, index (0), the same text is inserted in richtextbox2, example index(1) in form2.
this is also worth for the other richtextbox1.
in form2, there are richtextbox2 that I must directly fill, (they don't have the correspondent in form1).
in form1 I have inserted this code:
this code works but if I write in the richtextbox1s of form1 the text it passes in richtextbox2 of form2;
if I write in the richtextbox2s and then return in form1 and click in a whatever richtextbox1 the vb stops him and the screen is flashing.
how do I modify the code?
thanks
best regards
i have a problem with vb6.
I have 2 forms visualized at the same time.
in form1 I have an array of richtextbox1;
in form2 I have an array of richtextbox2;
when I fill richtextbox1, index (0), the same text is inserted in richtextbox2, example index(1) in form2.
this is also worth for the other richtextbox1.
in form2, there are richtextbox2 that I must directly fill, (they don't have the correspondent in form1).
in form1 I have inserted this code:
Code:
Private Sub Form_Activate()
RichTextBox1(0).SetFocus
End Sub
Private Sub RichTextBox1_GotFocus(Index As Integer)
RichTextBox1(Index).SelStart = 0
RichTextBox1(Index).SelLength = Len(RichTextBox1(Index).Text)
RichTextBox1(Index).SetFocus
End Sub
Private Sub RichTextBox1_Change(Index As Integer)
On Error GoTo Errhandler
Select Case Index
Case 0
Form2.RichTextBox2(6).Text = _
Form1.RichTextBox1(0).Text
Case 1
a = CStr(Form1.RichTextBox1(1).Text)
Form2.RichTextBox2(7).Text = CStr(a)
Case 2
a = CStr(Form1.RichTextBox1(1).Text)
b = CStr(Form1.RichTextBox1(2).Text)
Form2.RichTextBox2(7).Text = CStr(a) + "," + " " + "n°" + " " + (b)
Case 3
a = CStr(Form1.RichTextBox1(3).Text)
Form2.RichTextBox2(8).Text = CStr(a)
Case 4
Form2.RichTextBox2(9).Text = _
Form1.RichTextBox1(4).Text
Case 5
a = CStr(Form1.RichTextBox1(4).Text)
b = CStr(Form1.RichTextBox1(5).Text)
Form2.RichTextBox2(9).Text = CStr(a) + "," + " " + "n°" + " " + (b)
and so on....
End Select
Errhandler:
Exit Sub
End Sub
if I write in the richtextbox2s and then return in form1 and click in a whatever richtextbox1 the vb stops him and the screen is flashing.
how do I modify the code?
thanks
best regards