1. Does the attached Example.xlsm work?

2. If you put the macro into your own workbook, did you put it on the worksheet's code module?

3. maybe make a small debug change

Msgbox Target.address

 Set r = Target.Cells(1, 1)