Trigger Button

How do you trigger the actions associated with a button

take for example a button called “buttonGo” that you have specific code in. When you click button b you also want buttonGo to execute its code.

I saw this done before and know it’s possible… I just need some clarity as to the process.