Problem wiht gotfocus events etc.

M

Missy

Hello,

I have a form that worked fine with activate and gotfocus
events and now I put that form as a subform in a tab
control and now the activate event no longer works. I
have about 4 tabs each with events in activate (when that
form is displayed), but none of those events work
anymore, how would I fix this, thanks.

Missy
 
W

Warrio

you have to specify it into the change event of your tab control

Private Sub MyTab_Change()
MsgBox "This tab is number : " & myTab.Value
End Sub

when you the user selects another tab, it will come into this even
and for you, to be able to deffrenciate wihch tab you have to use, you can
do:

Private Sub MyTab_Change()
If myTab.Value = 0 then 'first tab
.....
elseif myTab.Value = 1 then
....
endif
End Sub
 

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