TextArea.Focus
put the cursor at the beginning of the text when I tested it. You can move it using the SendKeys
method:
Sub Window_OnLoad
TextArea.Focus
CreateObject("WScript.Shell").SendKeys "^{Home}"
End Sub
The SelStart
and SelEnd
properties apply to textbox controls in Visual Basic forms, not to HTML <textarea>
elements.
For more sophisticated cursor handling in textareas you probably need JavaScript.