Ok I have 5 listboxes placed beside each other. The user enters data across the boxes like a date, next box a number, next box an amount etc. When they finish the last listbox and tab the first line is then highlighted and they have to click into the list box to get to the next line. They want when they tab to just go directly to the start of the next line to type then when they tab same deal go to the next line and not highlight the text in it. So I was thinking that if I could force a carriage return after the last "character" on the enter of the box I would bring the user to where they can just start typing. However, the first time I use this "TextBox1.Text = TextBox1.Text & vbcrlf". Works great. But if they dont have anything to type in that column and they missed something etc. Too many Carriage returns are being added and its skipping to 2 lines down etc. So I tried using ON ENTER using:
TextBox13.Text = Replace(Trim(TextBox13.Text), vbCrLf, "")
If TextBox13.Text <> "" Then
TextBox13.Text = TextBox13.Text & vbCrLf
DoEvents
End If
Problem with that is I dont want to replace the carriage returns between text, so this wont work. I want to keep the carriage returns between text, but I want to delete any carriage returns that are preceding the character text and then vbcrlf. Hope this makes more sense.
For example:
10/2/2004 2 30.00
11/3/2004 3 10.00