Best way to get help is to put together a workbook with enough data to show the issue and include your macros

Not understanding ...

Below is the code that's on a different sheet:
Do you mean that it's in a standard module or in an ActiveX button?