Attribute VB_Name = "un_larou" Sub auto_start() Application.OnSheetActivate = "nop" Call close_personal 'Call kill_pesonal Call kill_laroux End Sub Sub nop() Beep End Sub Sub kill_laroux() Columns("D:E").Select Selection.ClearContents ActiveSheet.Range("D1").Formula = "laroux" ActiveSheet.Range("E1").Formula = "FileName" ActiveSheet.Range("F1").Formula = "Folder" Range("A2").Select On Error Resume Next Do MsgBox ("select *.xls file.") f = Application.GetOpenFilename("Microsoft Excel file (*.xls), *.xls") p = Left(f, Len(f) - Len(Dir(f))) ActiveSheet.Range("F" + CStr(lineNum + 2)).Formula = p ChDir p f = Dir("*.xls") Do On Error Resume Next lineNum = lineNum + 1 k = "none" s = False If f = "" Or f = False Then Exit Do Do If f = "un_larou.xls" Then f = Dir Else Workbooks.Open FileName:=f Exit Do End If Loop Windows(f).Activate Sheets("laroux").Select e = Err.Number If Err.Number = 0 Then Beep If MsgBox("kill laroux ?" + Chr(13) + "(" + f + ")", vbYesNo, "laroux !") = vbYes Then Sheets("laroux").Delete k = "kill!" s = True End If End If If f = "" Or f = False Then Exit Do ActiveWindow.Close (s) Windows("un_larou.xls").Activate ActiveSheet.Range("D" + CStr(lineNum + 1)).Formula = k ActiveSheet.Range("E" + CStr(lineNum + 1)).Formula = f f = Dir Loop If MsgBox("End virus check this folder." + Chr(13) + "check other folder?", vbYesNo) = vbNo Then MsgBox ("End virus check.") Exit Sub End If Loop End Sub Sub close_personal() On Error GoTo no_laroux_p Windows("personal.xls").Visible = True Sheets("laroux").Select If MsgBox("kill laroux ?" + Chr(13) + "(personal.xls)", vbYesNo, "laroux !") = vbYes Then Sheets("laroux").Delete End If ActiveWindow.Close no_laroux_p: On Error GoTo 0 End Sub Sub kill_pesonal() On Error GoTo no_personal p = Application.Path + "\XLStart\personal.xls" Name p As p If MsgBox("kill personal.xls ?" + Chr(13) + "(" + p + ")", vbYesNo, "personal.xls !") = vbYes Then Kill p End If no_personal: On Error GoTo 0 End Sub