par Michael DELIQUE » 21 Oct 2010 à 11:38
- Code : Tout sélectionner
Sub WindowsOpenPath(wPath As String)
'Déclaration variable
Dim vrShell As Variant
Dim Path As String
On Error Goto ErreurHandle
Path = "C:\"
If Trim(wPath)<>"" Then
If DirectoryIsValide(Trim(wPath)) = True Then
Path = Trim(wPath)
End If
End If
Set vrShell = CreateObject("WScript.Shell")
vrShell.Exec("explorer "+Path)
Set vrShell = Nothing
Exit Sub
ErreurHandle:
Msgbox "("+Cstr(Getthreadinfo (1))+" Call by "+Cstr(Getthreadinfo(10))+")"+Chr(10)+"Erreur " + Str(Err) + " : "+Chr(10) + Cstr(Error)+". "+Chr(10)+"Ligne N° "+Cstr(Erl),16," ERREUR !"
Exit Sub
End Sub
Cordialement
Michael (SMS-Phobique)
----------------------------
"La théorie, c'est quand on sait tout et que rien ne fonctionne. La pratique, c'est quand tout fonctionne et que personne ne sait pourquoi."
Albert EINSTEIN