Thanks p45cal for your gereat explanations, as always. The code makes much more sense to me now

.
Also with regard to creating the addin, I have pasted md's addin code into a workbook with buttons and your code (only slightly modified as mentioned in my previous post).
Could yourself, Bob or md please help put the finalising touches on the addin creation code or settings in the attached workbook please e.g. the appropriate additions to the workbook event code, and any other settings that need to be toggled?