如何取消保护Excel工作簿 [英] How to unprotect an Excel workbook

查看:808
本文介绍了如何取消保护Excel工作簿的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个受密码保护的Excel工作簿(整个文档,而不仅仅是一张工作表或一组工作表 - 无法打开没有密码的文件)。我知道密码,所以我可以打开它,但没有明显的方法来关闭密码保护。



具体来说,我想这样做VBA,因为最终我想能够使用循环对多个文件执行此操作。我尝试使用:

  ThisWorkbook.Unprotect(Password =[password])

但这绝对没有。

解决方案

如果是打开文件的密码,您需要:

  Thisworkbook.Password =

然后保存。



Wb.Unprotect 将删除保护工作簿结构/窗口的密码。


I have an Excel workbook that is password protected (the entire document, not just a sheet or set of sheets - you can't open the file without the password). I know the password, so I am able to open it, but there is no obvious way to turn off the password protection.

Specifically, I would like to do this in VBA, because eventually I want to be able to do this to multiple files using a loop. I tried using:

ThisWorkbook.Unprotect(Password = "[password]")

but this does absolutely nothing.

解决方案

If it's the password to open the file, you want:

Thisworkbook.Password = ""

then save it.

Wb.Unprotect would remove the password that protects the workbook structure/windows.

这篇关于如何取消保护Excel工作簿的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆