Protecting a Sheet - Issue
I just double-checked (Excel 2003) and had no trouble detecting a
Worksheet_Change event based on selecting from an Unlocked cell with a list
via data validation in it. So have to look elsewhere.
I recently ran into similar situation and for a while I thought the _Change
wasn't firing in a group of merged cells set up with data validation/list.
What actually turned up in that situation was that there was another user
defined function that used Application.Volatile in it that was interrupting
the processing in the _Change code and never returning control to the
_Change() code once it had done so.
I think you're going to have to single step through the code to see all that
is going on and determine if something like that is happening. Just put a
breakpoint early on in your _Change() event code (or just a Stop instruction)
and then when you get there, start using [F8] to single step through it all,
following closely to see where it goes astray or fails completely.
" wrote:
I have the following code that I run to protect a sheet
ActiveSheet.Protect Password:="xyz", DrawingObjects:=True,
Contents:=True, Scenarios:=True
Sheets("Visit Log").Select
ActiveSheet.Protect Password:="xyz", DrawingObjects:=True,
Contents:=True, Scenarios:=True
Range("D7").Select
I have all required cells within the sheet "Visit Log" unlocked. These
unlocked cells are Data Validation drop down lists which run a change
event code when selected (just changes the background colour)
My problem is that when my sheet is protected with the above code, the
Change event code doesn't work
Any ideas?
Thanks
|