當前位置:編程學習大全網 - 行動軟體 - 怎麽取消自動打開StartUp.xls的文件?

怎麽取消自動打開StartUp.xls的文件?

StartUp.xls宏病毒現象。

StartUp.xls宏病毒清除方法:

第壹步:清除C:\Documents and Settings\administrator\Application Data\Microsoft\Excel\XLSTART下的StartUp.xls;

第二步:清除C:\Documents and Settings\administrator\Application Data\Microsoft\Excel\的Excel11.exe(約236K),Excel程序會自建該文件。

第三步:新建\Documents and Settings\administrator\Application Data\Microsoft\Excel\XLSTART\startup.xls文件,輸入以下代碼就行了,以後再打開帶毒的excel文件就會自動清除excel文件自帶的病毒宏代碼了

Sub auto_open()

On Error Resume Next

Application.ScreenUpdating = False

ActiveWindow.Visible = False

n$ = ActiveWorkbook.Name

Workbooks(n$).Close (False)

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.VBProject.VBComponents(Name)

book.VBProject.VBComponents.Remove delComponent

Next

End Sub

  • 上一篇:1993年,汪辜會談在哪裏舉行?會談取得了哪些成果
  • 下一篇:路線的英語怎麽說
  • copyright 2024編程學習大全網