Problem in Tab Control

  • Thread starter Thread starter Joao
  • Start date Start date
J

Joao

I insert 5 pages in a Tab Control object. I want an event action when the
mouse clicks on a specific tab. Here's the code...it doesn't produce
anything...

-----------------------------------------------------------------------------------------
Private Sub TabAdministration_Click() 'Tab Page
If fp.lblUtilID.caption <> "Admin" Then MsgBox "No privileges!",
vbExclamation, "Atention!"
TabEmployee.SetFocus 'Another Tab Page.
Else
End If
End Sub
 
Hi Joao,
on the change event of the tab control you can add a select case
onTheNameYourOfTabControl.Value so you can know which tab has been clicked
and add whatever code you want. (The value are the page index of the tab)

HTH Paolo
 
LOL what a dumb I am... the easiest thing...

Private Sub TabPrincipal_Change()
MsgBox (TabPrincipal.Value)
........
End Sub

Thank you Paolo
 

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

Back
Top