This is an aweful way of doing it - you should not simulate tab keys like this. What you should do is create a
List<TextBox>
containing the TextBoxes you wish to set the text of then loop through that. E.g.
List<TextBox> MyTextBoxes = new List<TextBox>();
MyTextBoxes.Add(textbox1);
string strnew = "hello";
int j = (int)Random.Next(0, MyTextBoxes.length);
for(int i = 0; i <= j; i++)
{
MyTextBoxes[i].Text = strnew;
}
Hope this helps,
Ed