I am trying to figure out why this is not sending a ALT+F to notepad,
Private Declare Function FindWindow1 Lib \"user32\" Alias \"FindWindowA\" (ByVal lpClassNam
Use Postmessage instead of Sendmessage
Public Const WM_SYSKEYDOWN = &H104 PostMessage hwnd, WM_SYSKEYDOWN, vbKeyF, 2 ^ 29 'Simulates Alt + F (2^29 sets the 29 bit of lParam indicating Alt is being pressed.