Hi, Andrés Israeliantz
This usually means Excel is not dealing with the same type of protection the user expects, and workbook-structure protection and VBA project protection are checked separately. It can also happen if the file is fine but Excel on the new PC is handling trust settings or the file environment differently, and these passwords are case-sensitive.
Here are some suggestions you can try:
First, type the password into Notepad to verify the exact characters, keyboard language, Caps Lock, and NumLock, then paste it into Excel, since the password check is case-sensitive.
For the VBA side, it is recommended that the file be saved locally, then opened after enabling content or placing it in a Trusted Location, because Microsoft 365 can block VBA until the workbook is trusted.
If only certain files fail, it is also recommended to test by copying the sheets into a brand-new workbook and then moving the VBA code over, as copying the tab to a new workbook may resolve the protection problem for that file.
Thank you for your patience in reading, I hope this information has been helpful to you.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment."
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.