UNprotect columns in protected workbook
Some columns in my workbook are locked and some not. I want to be able to
unlock via a macro the selected columns in the active sheet then be able to lock them after data entry. This wil the macro in Personal.xls I have looked at previous answers which do not seem to help. Thanks Nev |
UNprotect columns in protected workbook
Try below to unlock selected cells. Please modify if you have a password..
Sub UnLockSelection() Activesheet.UnProtect Selection.Locked = False Activesheet.Protect End Sub After data entry (based on which event) you need to again unprotect. Select all cells..and protect back.. If this post helps click Yes --------------- Jacob Skaria "Nev" wrote: Some columns in my workbook are locked and some not. I want to be able to unlock via a macro the selected columns in the active sheet then be able to lock them after data entry. This wil the macro in Personal.xls I have looked at previous answers which do not seem to help. Thanks Nev |
UNprotect columns in protected workbook
On Sun, 19 Apr 2009 06:27:03 -0700, Nev
wrote: Some columns in my workbook are locked and some not. I want to be able to unlock via a macro the selected columns in the active sheet then be able to lock them after data entry. This wil the macro in Personal.xls I have looked at previous answers which do not seem to help. Thanks Nev Turning protection on or off is a manual operation due to the password requisite. Perhaps you could lock cells from user access, yet fill the data those cells contain by way of a separate cell array that the user does have access to. |
UNprotect columns in protected workbook
Jacob
that's great! I did not think it would be done like this. Because it is, I see that i can enter new data immediately - is there a way to lock the cell once the new figure is entered and the enter button is pushed Thanks Nev "Jacob Skaria" wrote: Try below to unlock selected cells. Please modify if you have a password.. Sub UnLockSelection() Activesheet.UnProtect Selection.Locked = False Activesheet.Protect End Sub After data entry (based on which event) you need to again unprotect. Select all cells..and protect back.. If this post helps click Yes --------------- Jacob Skaria "Nev" wrote: Some columns in my workbook are locked and some not. I want to be able to unlock via a macro the selected columns in the active sheet then be able to lock them after data entry. This wil the macro in Personal.xls I have looked at previous answers which do not seem to help. Thanks Nev |
All times are GMT +1. The time now is 09:12 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com