This is also very useful to protect your VBA code that against copy and to protect your copyrights. VBA code password protection is a good thing to do when you spent a lot of hours developing some code and that you do not want to be copied or modified To do it in Excel, here is t...
This is a small VBA code to help you in dealing withProtectingandUnProtectingthe WorkSheet using Excel Macro. Assuming the fact here that you knowHow to Protect or UnProtect a Sheet using Excel In-Built function. For those who do not know protect or unprotect the sheet using Excel inbuilt fu...
By default, Microsoft Excel offersVBA password protectionas a way to protect VBA code. This method of VBA code protection is weak and can beeasily cracked. TheDoneEx XCell Compilerprovides amuch better and much stronger solution to protect your VBA codefrom being stolen. You can apply strong ...
' Macro1 Macro ' 由完美Excel录制 ' ActiveSheet.ProtectDrawingObjects:=True, Contents:=True, Scenarios:=True End Sub 可以看出,Excel VBA使用Protect方法保护工作表,虽然在操作中我们为保护工作表设置了密码,但Excel并没有为我们录制设置的密码项。然而,我们可以方便地使用Protect方法通过代码为保护工作表设置密码...
' Macro1 Macro '由完美Excel录制 ' ActiveSheet.ProtectDrawingObjects:=True, Contents:=True, Scenarios:=True End Sub 可以看出,Excel VBA使用Protect方法保护工作表,虽然在操作中我们为保护工作表设置了密码,但Excel并没有为我们录制设置的密码项。然而,我们可以方便地使用Protect方法通过代码为保护工作表设置密码。
ws.Protect Password:=ps Next ws End Sub 如果您想一次性保护所有工作表,这里有一个适合您的代码。运行此宏时,您将获得一个用于输入密码的输入框。输入密码后,单击“确定”。并确保注意CAPS。 If you want to protect your all worksheets in one go here is a code for you. When you run this macro,...
If .ProtectStructure = False And .ProtectWindows = False Then PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n) MsgBox Application.Substitute(MSGPWORDFOUND1, "$$", PWord1), vbInformation,...
IfActiveSheet.ProtectContents Then ActiveSheet.UnprotectPassword:='test' End If End Sub 说明: Unprotect方法只有一个可选参数Password,用来提供保护工作表时所设置的密码。 如果保护工作表时没有设置密码,可以忽略参数Password。 如果提供的密码不正确,那么Excel会弹出一个错误提示框,如下图所示。
New macro, execute, select the Excel file that needs to be broken, run. '1 > an excellent VBA protects password cracking program to test Windows 98 + OFFICE97 '2 > USES the following code to protect the VBA from the protection of the VBA and the professional version of the Advanced VBA...
(n) If .ProtectStructure = False And .ProtectWindows = False Then PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n) MsgBox Application.Substitute(MSGPWORDFOUND1, "$$", PWord1), ...