Option ExplicitSub KillThisWorkbook() With ThisWorkbook .Saved = True .ChangeFileAccess xlReadOnly .Close Kill .FullName End WithEnd Sub
ThisWorkbook,可能是此类里没有你引用的对象,或者你的应用对象错了
kill后面少了空格