Just curious, but I was looking to do some simple manipulations of variables based on what tab was selected.

But I dont see Deselected, Or Selecting as in this example, does 2005 use somthing different?

vb Code:
  1. Private Sub TabControl1_Deselecting(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TabControlCancelEventArgs) Handles TabControl1.Deselecting
  2.     someClassLevelVariable = e.TabPageIndex
  3. End Sub

vb Code:
  1. Private Sub TabControl1_Selecting(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TabControlCancelEventArgs) Handles TabControl1.Selecting
  2.     If (e.TabPageIndex = 1) Then
  3.         e.Cancel = True
  4.     End If
  5. End Sub