Just put this code in a subroutine called by the other macro where needed, and you can run it when needed.