Use the OnTime to call this at the interval required.
The keyboard driver?s interrupt handler calls the keybd_event function.
To the system it is the same as pressing a key.
This is also a more reliable way to simulate keystrokes as opposed to sendkeys.
Option Explicit
Const VK_D = 68
Const VK_O = 79
Const VK_I = 73
Const VK_T = 84
Const KEYEVENTF_EXTENDEDKEY = &H1
Const KEYEVENTF_KEYUP = &H2
Private Declare Sub keybd_event Lib "user32.dll" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Sub showActivity()
keybd_event VK_D, 0, 0, 0 ' press D
keybd_event VK_D, 0, KEYEVENTF_KEYUP, 0 ' release D
keybd_event VK_O, 0, 0, 0 ' press O
keybd_event VK_O, 0, KEYEVENTF_KEYUP, 0 ' release O
keybd_event VK_I, 0, 0, 0 ' press I
keybd_event VK_I, 0, KEYEVENTF_KEYUP, 0 ' release I
keybd_event VK_T, 0, 0, 0 ' press T
keybd_event VK_T, 0, KEYEVENTF_KEYUP, 0 ' release T
End Sub