Sorry I forgot the constant. You will also need to make sure the focus is in the right place. Drop a command button and a textbox on a form then add this code
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, _
ByVal dwExtraInfo As Long)
Private Const VK_RIGHT = &H27
Private Const KEYEVENTF_KEYUP = &H2
Private Sub Command1_Click()
Text1.SetFocus
keybd_event VK_RIGHT, 0, 0, 0
keybd_event VK_RIGHT, 0, KEYEVENTF_KEYUP, 0
End Sub
Sorry about that, I guess I am still waking up.
If you choose to battle wits with the witless be prepared to lose.
![[machinegun] [machinegun] [machinegun]](/data/assets/smilies/machinegun.gif)
![[cheers] [cheers] [cheers]](/data/assets/smilies/cheers.gif)