Take a look at the error message. It is telling you exactly why it failed:
Select Menu Item failed to find target menu item Style>Character Style Sheet>track number.
This means at the time when the macro was run, it could not find the menu item Style>Character Style Sheet>track number
I don't have QuarkXPress, so I can make any further suggestions, other than double-checking this menu item before you trigger the macro.
We might be able to be of more help if you could upload your macro .
Please read:
Tip: How Do I Get The Best Answer in the Shortest Time?