soleturnes
New Member
- Joined
- Sep 26, 2022
- Messages
- 7
- Office Version
- 365
- Platform
- Windows
Hi! I have an excel file with some macros, which i've been using for a while, that protect and unprotect the workbook, with the password written in the code, but for some reason it isn´t recognizing now the password.
The password hasn´t been changed.
Could someone please help me?
I'll post my code below, but it works fine with other files.
Code to unprotect:
ActiveWorkbook.Protect Password:="xx", Structure:=False
I've already tried without success:
ThisWorkbook.Protect Password:="xx", Structure:=False
Workbooks("NAME").Protect Password:="xx", Structure:=False
ActiveWorkbook.UnProtect Password:="xx"
ActiveWorkbook.UnProtect (["xx"])
Opening it in Safe Mode
When trying to unlock the workbook in the review tab I get the same error
Thanks!
The password hasn´t been changed.
Could someone please help me?
I'll post my code below, but it works fine with other files.
Code to unprotect:
ActiveWorkbook.Protect Password:="xx", Structure:=False
I've already tried without success:
ThisWorkbook.Protect Password:="xx", Structure:=False
Workbooks("NAME").Protect Password:="xx", Structure:=False
ActiveWorkbook.UnProtect Password:="xx"
ActiveWorkbook.UnProtect (["xx"])
Opening it in Safe Mode
When trying to unlock the workbook in the review tab I get the same error
Thanks!