I recall reading that there is a hierarchy for ambiguous variable names in this situation, but can't remember which gets priority.
Now I'm going to have to try some experiments with variables named Target.
That was my thought but I didn't actually test it, that said something must be happening for the event to trigger.
That's why I thought maybe the code was in a regular module and was being called and target was being passed in.
I did a little experiment.
All of the code below is in a regular module.
When I use the y as a worksheet, I get error 13 type mismatch right at the call line. When I use the range part it runs your code no problem.
Bookmarks