tabControl - Active tab?

G

Grand Mainger

I wish to use an event triggered by clicking on a tab of a tabControl.
However, the onClick event seems to be associated with the page and
not the tab. How can I trigger an event by clicking on the tab?

Martin Dashper
 
T

Tony C

You need to be triggering events using the "On Change"
Event Procedure.

If you are wanting to trigger certain events based on the
Tab Page selected, then you need to ascertain the "Page
Index" of each Page (select each page, display the
properties and select the "Format" Tab).

Then on the Tab Page Control "On Change" Event Procedure
add code like: -

If Me.TabPageControl01.Value = 1 Then Msgbox(Tab Page 01")
If Me.TabPageControl01.Value = 2 Then Msgbox(Tab Page 02")
If Me.TabPageControl01.Value = 3 Then Msgbox(Tab Page 03")

HTH


Tony C
 

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