>I have an editbox on a form that fires some code the first time the interactivechange() event happens. Problem is that due to the code that's run, I loose focus of the editbox. Simple solution was to do a setfocus() where this is happening.
>
>My problem is that I want to put the cursor back at the exact same location within the editbox.
>
>Is there a way to do this? (I hope, I hope)
Capture the SelStart property and save it - this is either thestart of the presently selected block of text in the editbox, or if no text is selected, the insertion point. SelLength indicates the size of the selected textblock; it will be 0 if nothing is selected, in which case SelStart is the insertion point. Your only problem comes where you've marked a block of text - the cursor may be at the start or endpoint of the block depending on whether you anchored at the right edge or left edge to select.
To restore the cursor/selected block on return, just restore SelStart and SelLength.