Hi, Pls I'm trying to move across tabpages without clicking on the tabcontrols but by using a command button to move across tab controls[code=vb.NET]
Hi,
Pls I'm trying to move across tabpages without clicking on the tabcontrols but by using a command button to move across tab controls

This will keep moving through the tabs in order:

Public Class frmTab

	Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
		Dim idx As Integer = TabControl1.SelectedIndex + 1
		If (idx >= TabControl1.TabCount) Then
			idx = 0
		End If
		TabControl1.SelectedIndex = idx
	End Sub
End Class

You can also use the SelectTab() method to programmatically select a particular tab.

For example, To move to the first tab,

yourTabControlName.SelectTab(0)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.