If a certain tab is selected then run a code

J

John

I wanted to know if there is a way to know when a person
is on a certain tab because I would want to be able to
disable a option group when a certain page is selected.

Thanks in advance,
John
 
R

Rick Brandt

John said:
I wanted to know if there is a way to know when a person
is on a certain tab because I would want to be able to
disable a option group when a certain page is selected.

Test the Value property of the TabControl in the TabControl's Change event.
It will correspond to the index property of the TabPage currently "on top".

If Me.TabControlName.Value = 2 Then...

The above would evaluate to true when the TabPage with index value 2
(usually the third page) was selected.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top