I have a textfield and a textarea that feed a listbox. User types an abbreviation into the textfield, hits a tab, then types what he wants it to expand to in the textarea. When the Return key is hit, both are added to the listbox and the cursor returns to the textfield. The problem comes when you hit the tab a second time to go to the textarea. The cursor begins on the second line of the textarea instead of at the beginning. Is there a way to prevent the cursor from appearing there? I don’t want a return to be added to the expanded text. Here is my abridged code for the textarea’s keydown event:
If key=Chr(13) or Key= Chr(3) then
ListBox1.addRow textField1.text
ListBox1.cell(ListBox1.lastIndex,1) = textArea1.text
textField1.text = ""
textArea1.text = ""
textField1.setFocus
end if