Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
 
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
 
Sub lancer()
'creer un fichier rar 
Dim chemin As String
Dim param As String
Dim action As String
chemin = "C:\Program Files\WinRAR\WinRAR.exe"
param = "a -ep1 -r0 -iext -- C:\classueur.rar C:\classeur.xls"
action = "Ouvrir"
 Call ShellExecute(0, action, chemin, param, vbNullString, 1)
End Sub