Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to check which tab control is active 1

Status
Not open for further replies.

rene1000

IS-IT--Management
Apr 9, 2002
89
NL
I have a form which has three tab controls on it. I have a button on the form which needs to run some vb code depending on the tab which is currently active. Does anyone know how to do this ?
 
Dim Ctrl as control

For each Ctrl In Me.Controls
if Ctrl.Gettype isGetType(Label) then
do this......
else
if Ctrl.GetType isgetType(Listbox) then
do this....
next

Another way

If (Listbox1.Itemselected >0) then
do this
else
if......
....

Hope you got an idea.
 
unfortunately it doesn't seem to work buj123.
any other ideas ?
 
let me know what type of controls do u have in ur form
Is it a listbox or.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top