打开excel显示无法找到StartUp.xls怎么办

2024-12-03 07:51:08
推荐回答(4个)
回答1:

这是宏病毒,可以用360、瑞星、金山等杀毒软件清除。如果还是不行,手动清除。

StartUp.xls宏病毒清除方法
新建一个Excel文件,按alt+f11调出VBA代码窗口,新建VBA模块,输入以下代码,关闭后再打开excel文件一次,彻底清除电脑中的StartUp病毒。

Sub auto_open()
Dim FS As Object
Dim BK As Workbook
Dim SHT As Worksheet
Dim ifExist As Boolean

On Error Resume Next
'判断是否存在StartUp,以ifExist标记
ifExist = False
If Dir(Application.StartupPath & "\" & "StartUp.xls") <> "" Then ifExist = True
If ifExist = False Then
For Each BK In Workbooks
If ifExist Then Exit For
For Each SHT In BK.Sheets
If ifExist Then Exit For
If BK.Sheets("StartUp").Name <> "StartUp" Then
ifExist = False
Else
ifExist = True
End If
Next SHT
Next BK
End If

'判断是否清除StartUp
If ifExist Then
If MsgBox("发现StartUp!" & vbCrLf & "StartUp可能影响你的Excel!是否清除?", vbOKCancel) = vbCancel Then Exit Sub
Else
MsgBox "未发现StartUp,自动退出"
ThisWorkbook.Close
Exit Sub
End If

'关闭StartUp.xls
Workbooks("StartUp.xls").Close False
'删除文件
Set FS = CreateObject("Scripting.FileSystemObject")
FS.DeleteFile Application.StartupPath & "\" & "StartUp.xls"
'删除宏模块StartUp
Application.DisplayAlerts = False
For Each BK In Workbooks
BK.Sheets("StartUp").Delete
Next BK
Application.DisplayAlerts = True
'恢复变量
Application.OnSheetActivate = ""
Application.OnKey "%{F11}"
Application.OnKey "%{F8}"
MsgBox "清除StartUp完毕,自动退出!"
ThisWorkbook.Close
End Sub

回答2:

不清楚你的book1是什么问题?
不过,excel默认打开的文件都在一个文件夹中C:\Documents and Settings\xxx(你的用户名)\Application Data\Microsoft\Excel\
到这个文件里面找个文件夹XLSTART,自己想打开什么文件都可以的,考进来就可以了。

回答3:

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

回答4:

下个office 重装就好了