Viisual Basic Sendkeys error

Status
Not open for further replies.

xenos

Beta member
Messages
3
Visual Basic Sendkeys error

I'm writing a text editor/psuedo-IDE in Visual Basic and I have a menu option allowing the user to compile java code written in the editor. I'm trying to do this by sending keys to the shell. Here's the code and error after clicking the menu option:

Private Sub mnuJavac_Click()
AppActivate Shell("cmd.exe", vbNormalFocus)
SendKeys "javac " & CommonDialog.filename & "{ENTER}", True
End Sub


Run-time error '5'
Invalid procedure call or argument

The first line "AppActivate...." is highlighted during 'debugging'. The shell starts up but it doesnt send the keys. Any suggestions?
 
Status
Not open for further replies.
Back
Top Bottom