par Michael DELIQUE » 19 Oct 2008 à 13:29
- Code : Tout sélectionner
Public Sub WindowsSetVariable(wVariable As String, wValeur As String)
'Déclaration variable
Dim vrShell As Variant
On Error Goto ErreurHandle
If Trim(wVariable) = "" Then
Exit Sub
End If
' If Trim(wValeur) = "" Then
' Exit Sub
' End If
Set vrShell = CreateObject("WScript.Shell")
vrShell.Environment("PROCESS").Item(wVariable) = wValeur
Set vrShell = Nothing
Exit Sub
ErreurHandle:
Msgbox "("+Structure_Log+" : "+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 !"
Set Session = New NotesSession
Call Error_LOG(Session.CurrentDatabase,Cstr(Session.Username),Cstr(Now),Structure_Log,Cstr(Getthreadinfo(10)),Cstr(Getthreadinfo (1)),Cstr(Err),Cstr(Error),Cstr(Erl))
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