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
Private Sub FileOpen_Click()'открываем файл
ShellExecute 0, vbNullString, "D:\1.doc", _
vbNullString, vbNullString, vbNormalFocus
End Sub
Private Sub DirOpen_Click()'открываем папку
ShellExecute 0, vbNullString, "D:\", _
vbNullString, vbNullString, vbNormalFocus
End Sub
|