Unable to unlock password protected VBA code in Excel with correct password

Peter Karlström 21 Reputation points

Since 2016 I have been working with an VBA-featured Excel file for statistical data and calculations.
The worksheet structure and the VBA code is protected with a seven-letter password with only lower caps letters.
The password has always been the same and I have never had this problem before.
Last update in the file was in May this year.

Yesterday, when I tried to unlock the VBA code I get the message Wrong password.
I have over 50 of versions of this file so I started to try and open some of the older ones, but with the same result, password is wrong!
I know the password is correct and I can actually unlock the worksheets with it, but I am still not able to access the VBA code.

I have been through possible causes and the only thing that is changed since May is that my PC is replaced with a new one. But, I have been able to unlock the VBA code in other PC’s during the years, so this really doesn’t make any sense.

Does anybody have a clue what this is all about?

Best Regards
Peter Karlström
Midrange AB, Sweden

Office Management
Office Management
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Management: The act or process of organizing, handling, directing or controlling something.
1,993 questions
Excel Management
Excel Management
Excel: A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.Management: The act or process of organizing, handling, directing or controlling something.
1,636 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Ceasar Chen_MSFT 4,391 Reputation points

    Hi, @Peter Karlström
    This issue is a known issue. Will there be a similar problem with starting Excel in Safe Mode? You may need to unlock the VBA code on the original device.

    If the response is helpful, please click "Accept Answer" and upvote it.
    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.

    0 comments No comments

  2. Peter Karlström 21 Reputation points

    Hello and thank you for your reply.

    I have tested to start excel with /safe parameter, but the result is the same.
    Unfortunately, I just found out that the old device is no longer available.

    I have previously been able to open it with other computers, but that doesn't work either.
    Since this is a known issue, do you know what the underlying cause of this is?

    Best Regards