Linking to Specific Tab from another Link or Button

Thanks for this danro.

Am having trouble implementing this. My scenario requires linking to a specific tab from another page. I would think this code snippet assumes the tab and custom button are on the same page.

Any help here? Thanks a lot.