'
' dans la section déclaration de votre module
Public 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
'utiliser ShellExecute avec un code comme ci-dessous
Sub ShellExec()
Dim strFile As String
Dim strAction as String
Dim lngErr As Long
strFile = "c:\somefile.txt" ' le nom et le chemin du fichier souhaité
strAction = "OPEN" ' action might be OPEN, NEW or other, depending on what you need to do
lngErr = ShellExecute(0, strAction, strFile, "", "", 0)
' optionally, add code to test lngErr
End Sub