Programmatic method to switch tab in tab panel?


#1

Is there a command to switch between tabs in a tab panel on a form?


#2

It’s actually pretty simple. Your Tab Panel is dependent on a variable to tell which tab is to be displayed. Change the value of the variable, give it a ShowVariables command with that variable and your panel will change.

TabVariable = "NewTab"
ShowVariables TabVariable


#3

Thanks, JC. I had a feeling that the tab panel choice itself is reflected in a variable, but I’d forgotten where it was named. For others who are wondering, it’s in the ‘Data’ field of the Tab Panel Options.