I need someone to show me how to shellexecute ASAP!!
Thanks in advance!
Printable View
I need someone to show me how to shellexecute ASAP!!
Thanks in advance!
Code:
'too lazy to explain..going home..15 hour shift
'it's pretty straight forward..just play around
'with it...use different filenames and make sure
'the file and path exits
'api function
Option Explicit
Private Declare Function ShellExecute Lib "shell32.dll" Alias _
"ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, ByVal _
lpDirectory As String, ByVal nShowCmd As Long) As Long
'open the file try.txt with it's associated progarm
Private Sub Command1_Click()
Call ShellExecute(0&, vbNullString, "c:\try.txt", _
vbNullString, vbNullString, vbNormalFocus)
End Sub
Thanks!