Hi Rhudi,
You wrote that you are establishing ad hoc connections. Is that now in a new tab, that is not the script tab? Because within your
Case statement you set the tab object to again be the script tab. Instead you would want to reference your new tab object, where the connection was established with
ConnectInTab() I assume.