Hi
Code looks ok, so I suspect you are running the macro from an ActiveX Control. Set it's TakeFocus******* Propery to false or select any cell as the first line. If it's only to run a Procedure you should be able to use a CommandButton from the "Forms" toolbar.
Like this thread? Share it with others