Not Quite what I'm asking...
I don't want to kill the tabstop, just the processing of a tab in the textbox. Tab doesn't change controls as it is, but it does insert 8 spaces. OnKeyDown, I would like to kill the tab and insert 4 spaces instead but I don't know how to kill the tab after I have captured it or any key for that matter. A similar example would be inserting "b" when the "a" key is pressed without sending a backspace to delete the a. I don't want the "a" to appear at all.
Doesn't seem to work for me.
I tried this just to test:
Private Sub form_KeyAscii(KeyAscii As Integer, Shift As Integer)
If KeyAscii = vbKeyS Then
KeyAscii = 0
Text1.SelText = "a"
End If
End Sub
And the output is "as" every time I hit the s key. How come it's not cancelling the "s"?