Hi,
I'm trying to open a non-MS application and then use the SendKeys command. The window activates, but then it seems to lose focus by the next line (SendKeys). I can't even get it to work in Notepad with an example of simple code I found online:
Sub Write_Notepad()
AppActivate ("Untitled - Notepad")
SendKeys ("I am sending this from Excel VBA to NotePad")
End Sub
I can open a new Notepad window, but again, SendKeys won't write to it. With some variations of the code, I've had SendKeys text show up in the VBA text editor -- but never Notepad.
I am sure Notepad is activating in part because when I change the name, it throws an exception. This doesn't happen with "Untitled - Notepad."
Any suggestions appreciated!
Meg
I'm trying to open a non-MS application and then use the SendKeys command. The window activates, but then it seems to lose focus by the next line (SendKeys). I can't even get it to work in Notepad with an example of simple code I found online:
Sub Write_Notepad()
AppActivate ("Untitled - Notepad")
SendKeys ("I am sending this from Excel VBA to NotePad")
End Sub
I can open a new Notepad window, but again, SendKeys won't write to it. With some variations of the code, I've had SendKeys text show up in the VBA text editor -- but never Notepad.
I am sure Notepad is activating in part because when I change the name, it throws an exception. This doesn't happen with "Untitled - Notepad."
Any suggestions appreciated!
Meg