Can't Remove password protection
<HR style="COLOR: #ffffff; BACKGROUND-COLOR: #ffffff" SIZE=1><!-- / icon and title --><!-- message -->I inserted the following code into one of my workbooks to password protect the document before closing which works great, however when I reopen the workbook I type in the password the workbook opens and then I try to remove the protection but it is stuck and in the protection it keeps saying that the workbook isn't protected. I then removed all macro code from the workbook and saved it as a different file name however it still stays protected and there is no way to remove the protection, can someone please help with this.
code:
Application.DisplayAlerts = False
ThisWorkbook.Password = "jaye"
ThisWorkbook.Save
Application.DisplayAlerts = True
ThisWorkbook.Saved = True
ThisWorkbook.Close
<!-- / message -->
<HR style="COLOR: #ffffff; BACKGROUND-COLOR: #ffffff" SIZE=1><!-- / icon and title --><!-- message -->I inserted the following code into one of my workbooks to password protect the document before closing which works great, however when I reopen the workbook I type in the password the workbook opens and then I try to remove the protection but it is stuck and in the protection it keeps saying that the workbook isn't protected. I then removed all macro code from the workbook and saved it as a different file name however it still stays protected and there is no way to remove the protection, can someone please help with this.
code:
Application.DisplayAlerts = False
ThisWorkbook.Password = "jaye"
ThisWorkbook.Save
Application.DisplayAlerts = True
ThisWorkbook.Saved = True
ThisWorkbook.Close
<!-- / message -->