Private Sub TabControl1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged
Select Case TabControl1.SelectedIndex
Case 0
MsgBox(1)
Case 1
MsgBox(2)
End Select
'// หรือ
Select Case TabControl1.SelectedTab.Text
Case "TabPage1"
MsgBox(1)
Case "TabPage2"
MsgBox(2)
End Select
End Sub