Hi, I am new to visual basic 6, In a form I have many 20 textboxes such as
If (texbox1.Text < 2.85) Or (textbox1.Text > 3.15) Then
textbox1.Text = ""
Else
textbox1.BackCo lor = &H80000011
end if
If (texbox2.Text < 2.85) Or (textbox2.Text > 3.15) Then
textbox2.Text = ""
Else
textbox2.BackCo lor = &H80000011
end if
Is there a way that i can use function to change the backcolor without repeating
for the rest of the 20 textboxes. By the way please dont ask me to create
control array for the 20 text boxes as due to some reasons.
If (texbox1.Text < 2.85) Or (textbox1.Text > 3.15) Then
textbox1.Text = ""
Else
textbox1.BackCo lor = &H80000011
end if
If (texbox2.Text < 2.85) Or (textbox2.Text > 3.15) Then
textbox2.Text = ""
Else
textbox2.BackCo lor = &H80000011
end if
Is there a way that i can use function to change the backcolor without repeating
for the rest of the 20 textboxes. By the way please dont ask me to create
control array for the 20 text boxes as due to some reasons.
Comment