Add a text box and a command button to a form then drop in this code
Option Explicit
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_C = &H43
Private Const KEYEVENTF_KEYUP = &H2
Private Sub Command1_Click()
Text1.SetFocus
keybd_event VK_C, 0, 0, 0
keybd_event VK_C, 0, KEYEVENTF_KEYUP, 0
End Sub
This is just a quick code sample. You will need to add the Virtual Key Constants for the keys that you want. Hope this helps.
If you choose to battle wits with the witless be prepared to lose.
![[machinegun] [machinegun] [machinegun]](/data/assets/smilies/machinegun.gif)
![[ducky] [ducky] [ducky]](/data/assets/smilies/ducky.gif)