0

I received a protected excel file which only allows me to add values or select from a drop down list. The file has lots of different tabs, all in different format and questions.

I then unprotected the workbook to make my life easier (i.e. copy, paste, make notes etc) using the code found here: http://uknowit.uwgb.edu/page.php?id=28850

Now i am looking for a way to transfer all the values from the unprotected file back to the original file they sent me as I cannot submit an unprotected file. It is too many questions to do manually.

What is the best way to do this in excel 2013/VBA?

Thank you

Community
  • 1
  • 1

1 Answers1

0

It looks like you're wanting to do this on a sheet that previously had a password you didn't have access to. Also, it seems that you can't ask the worksheet creator to simply remove the password.

If both these are true, the best solution would be to save the modified sheet with the same name and send that sheet. From what I've seen, VBA and developer tools don't include a way to copy values to locked regions in a password-protected sheet, without unlocking that sheet:

ActiveSheet.Unprotect 'method to unlock current sheet, password may be required
ActiveSheet.Protect 'same to lock again

But, once a sheet is unlocked, you could loop through all cells in the region you want to copy from, and copy those values to the new sheet / workbook.

Please let us know if there's something else, or if something needs to be explained in more detail.

Aaron Thomas
  • 5,054
  • 8
  • 43
  • 89
  • You can also check out this question (http://stackoverflow.com/questions/1026483/is-there-a-way-to-crack-the-password-on-an-excel-vba-project), although it's not specific to Excel 2013. – Aaron Thomas Aug 21 '13 at 16:25