Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I had some changes to make to an Excel workbook that manipulates some other Excel files, formats the data appropriately and then uploads the data to a server. The VBA code for the macro is protected, and I know the password, so I was able to go into the macro and make the necessary VBA changes. However, I could not change the text of a button on one of the worksheets because that worksheet is also protected. Although I was 90% sure of the password for unprotecting the worksheet, Excel refused to accept my entry.

So, I made a new worksheet to replace the protected worksheet and proceeded to add back all the form fields onto this new worksheet. Then I locked the fields I wanted and protected this worksheet with a new password. Two minutes later, I unprotected the sheet again to make a change and used the new password. Five minutes after that, I tried to unprotect the sheet a second time but the password did not work. I know I'm typing the correct thing, and no, capslock isn't on, but Excel refuses to accept the password, although I literally only created it ten minutes ago, and know exactly what it is.

What is going on? Why is Excel not allowing me access? Has anyone else encountered a situation like this?

share|improve this question
2  
One thing I can think of is that somewhere in your VBA code an event unprotects your worksheets and then reprotects it with a new one. Search all the whole VBA project for .Protect, maybe this helps... –  Peter Albert Jan 7 '13 at 21:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.