If you could post your macro perhaps we could offer better suggestions.
See
KM Wiki: How to Post/Upload Your Macro to the Forum
Macro: [KM] UPLOAD Macro to New or Existing Topic
For more information, see the wiki Searching the Forum for Answers section.