Set appli= WScript.CreateObject("WScript.Shell")
chemin=left(wscript.Scriptfullname,len(wscript.scriptfullname)-len(wscript.name))
Set fso=CreateObject("Scripting.FileSystemObject")
h= time
hmax= dateadd("n",120,time)
while time < hmax
set fich= fso.getfile(chemin & "fichier1.xlsx")
if version <> fich.datelastmodified then
version= fich.datelastmodified
Set appli= WScript.CreateObject("excel.Application")
set monfichier=appli.workbooks.open(chemin & "fichier2.xlsm")
appli.visible=2
appli.run("deb")
'appli.quit
end if
wscript.sleep(5000)
wend
msgbox "fin"