Private Declare Sub keybd_event Lib "user32.dll" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Sub Command1_Click()
keybd_event &H5B, 0, 0, 0 'Press down the left windows key
keybd_event &H5B, 0, &H2, 0 'Release it
End Sub