Andrew (good name my man), there is a vbKeyTab constant. I checked it to be sure in the keypress event of a textbox and it worked, like this:
Code:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyTab Then
MsgBox "THIS IS A TAB!"
Else
MsgBox "THIS IS NOT A TAB!"
End If
End Sub
Whatever control you are using should recognize the vbKeyTab constant. For the second part of your question, do this:
Code:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyTab Then
KeyAscii = 0
Text1.SetFocus
'enter your subroutine or process here
End If
End Sub