Following on from Arnd's great suggestion, what is the return value of the SelectTab call? ie does it indicate that it actually has succeeded?
Also, are you playing around with redraw at all? Probably unlikely, but if redraw is turned off you may not see the tab as being selected until redraw is turned back on.
Good luck.
Nathan