hi,
here's the code I used to make vb 6.0 open a file at 'keypress'. When I run it I get an error message saying 'Invalid procedure call or argument', with the Shell command highlighted.
here's the code:
Option Explicit
Private sAppPath As String
Private Sub Command1_KeyPress(KeyAscii As Integer)
Shell(sAppPath, vbMinimizedFocus) As Double
End Sub
Private Sub Form_Load()
sAppPath = "C:\Documents and Settings\chaoui.1\Desktop\apt.doc"
End Sub
When I use the alternative shell syntax:
Shell ()As Double
I get the error prompt "statement invalid outside Type block".
Any suggestions?
Thanks
Hala
here's the code I used to make vb 6.0 open a file at 'keypress'. When I run it I get an error message saying 'Invalid procedure call or argument', with the Shell command highlighted.
here's the code:
Option Explicit
Private sAppPath As String
Private Sub Command1_KeyPress(KeyAscii As Integer)
Shell(sAppPath, vbMinimizedFocus) As Double
End Sub
Private Sub Form_Load()
sAppPath = "C:\Documents and Settings\chaoui.1\Desktop\apt.doc"
End Sub
When I use the alternative shell syntax:
Shell ()As Double
I get the error prompt "statement invalid outside Type block".
Any suggestions?
Thanks
Hala