First, make sure all of your tabs have object names (IE tab1, tab2, etc..) in the inspector.
To get the currently open tab panel is detailed here:
so set another global variable to get the current tab, IE $$tab
GetLayoutObjectAttribute ( "Tab1" ; "isFrontTabPanel" ) ; "Tab1" ;
GetLayoutObjectAttribute ( "Tab2" ; "isFrontTabPanel" ) ; "Tab2" ;
Then when you return, use the Go To Object script step to return to $$tab.
Thanks so much, works like a charm. Able to modify existing scripts with ease.