Hi,

Thanks for all your help. I finally got it to work, except for two parts of my code. When the enter key is hit I get any error saying that the file is already open. How do I close the file? Here is my code:

If keycode = 13 Then
Dim entFile As Integer
entFile = FreeFile
Open "C:\Log.txt" For Append As entFile
SendKeys "{enter}", True
Close entFile
End If
What I want to do is send an enter command to the text file.

Also, when I make this progran not visible it will not work it will run, but will not send any keys why? How do I make this program rn in the background, and not be visible.


Thanks for all your help!


Kevin