hi
i'm currently working on a simple module for a spreadsheet that my father uses at work. the problem i am having is related to protection. certain columns have to be protected, so that people that use the spread sheet cant just input any old values. setting this up is fine. the problem is, that i need to edit the value of the cells in VBA. now i have tried to unrpotect the sheet in code, but it simply wont work. i'm trying to do something like this:
WorkSheets("Price Match"
.Activate
ActiveSheet.Unprotect("password"
i've tried this lots of different ways round, but everyway i've tried it, i get a run time error - 1004 "unprotect method failed" or something similar
does anyone have any ideas? only its driving me crazy!
thanks in advance
Craig
i'm currently working on a simple module for a spreadsheet that my father uses at work. the problem i am having is related to protection. certain columns have to be protected, so that people that use the spread sheet cant just input any old values. setting this up is fine. the problem is, that i need to edit the value of the cells in VBA. now i have tried to unrpotect the sheet in code, but it simply wont work. i'm trying to do something like this:
WorkSheets("Price Match"
ActiveSheet.Unprotect("password"
i've tried this lots of different ways round, but everyway i've tried it, i get a run time error - 1004 "unprotect method failed" or something similar
does anyone have any ideas? only its driving me crazy!
thanks in advance
Craig