I doubt any of the follks that help here use code snippets to create code, so if you show the code that will be a good starting point. If you happen to get any errors that will also be helpful to know.
This is the code that goes into my button:
I obviously want it to go to frame 160 when you click the button.
No errors yet..
The code itself looks fine, so I have to wonder if the button your are clicking is not the instance that has the code assigned to it.
You said the code goes into your button. Do you mean it goes in the timeline that contains the button? If so, what frame is that button on, what frame is the code on, and do you happen to have more than one keyframe of that button on the timeline? If not, where is the code?