הגדרה של הפונקציה:
קוד:
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
שימוש בפונקציה:
קוד:
Private Sub shoko_Click()
Call ShellExecute(0&, vbNullString, "c:/test.doc", vbNullString, vbNullString, vbNormalFocus)
End Sub
תהנה..