Hey there, I've done quite a bit of research and have found this to be quite difficult. I have a worksheet that has 12 columns that a person can make a data entry into, but in order to add or delete or edit a row (#, name, dept. etc) they have to use either an "Add" or "Edit" button.
I have done the record macro and done things such as
to no avail...
I have applied the autofilter and need to enable the sort ascending and descending.
I thought about if a person selected the autofilter row "4:4" that it would unprotect, and then reprotect if the selection was not "4:4"... Though that does not work, as You can have selected "D9" and if you use the mouse to attempt the autofilter, that does not work...
If I had a Workbook_open() unprotect all the sheets and a before_save reprotect the cells. Would I then be able to simply have a worksheet_Change() macro where if the any of my "protected" cells underwent a change, it would undo/not allow the change... Would this essentially work to allow me to make get my desired result of a protected sheet with some functionality for sorting and filtering?
thanks,
jc
I have done the record macro and done things such as
Code:
For a = 1 to sheets.count
For a = 1 To Sheets.Count
Sheets(a).Protect Password:="Secret", UserInterfaceOnly:=True, AllowSorting:=True, AllowFiltering:=True
Next a
I have applied the autofilter and need to enable the sort ascending and descending.
I thought about if a person selected the autofilter row "4:4" that it would unprotect, and then reprotect if the selection was not "4:4"... Though that does not work, as You can have selected "D9" and if you use the mouse to attempt the autofilter, that does not work...
If I had a Workbook_open() unprotect all the sheets and a before_save reprotect the cells. Would I then be able to simply have a worksheet_Change() macro where if the any of my "protected" cells underwent a change, it would undo/not allow the change... Would this essentially work to allow me to make get my desired result of a protected sheet with some functionality for sorting and filtering?
thanks,
jc