D
Dave Peterson
Did you put the code in the same workbook as the worksheets to protect?
Did you only run the first macro?
Were there any errors when you ran it?
Did you only run the first macro?
Were there any errors when you ran it?
Hi Dave,
Thanks for the quick reply.
I've put the code under the "thisworkbook" workbook alone.
I just ran the first macro and there were no errors.
After submitting my first post, I learned that the first sheet is protected
because I cannot touch/edit the data on the 1st worksheet itself. While on
the other worksheets I can still edit the data inside the cell that's why I'm
wondering.
I tried experimenting by deleting data on the next worksheets and after
pressing the “Enter†key it does prompted a message that the worksheet is
protected as well. So the code is working properly.
However, my next problem is that...after sharing the protected file the
users can “access/view†and “save as†the file as read only. After they have
saved the file as read only they were able to open/view the code through
Macro-Visual Basic Editor in effect they now can see the password.
Is there any way I can hide the macro code so that they won’t have access on
the password?
Also, is that a normal result that only the first sheet is fully protected
while you can still click and edit data the cells of the other worksheets?
EugeniaP said:Does anyone know how to incorporate the allow-users-to-edit-certain-ranges
part into this protection macro?
Thank you!
msgbox "Processing: " & ws.nameFor Each ws In ThisWorkbook.Worksheets
ws.Unprotect Password:="123"
Next ws
msgbox "Processing: " & ws.nameFor Each ws In ThisWorkbook.Worksheets
Where do I insert the line you sugest?
msgbox "Processing: " & ws.nameFor Each ws In ThisWorkbook.Worksheets
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.