How do I make a tab be selected through code??

Thanks.
Danny.