VB - TabControl - SubForm - do some code ONLY If it is the Active tab subform
Posted on 2014-01-14
I have a Form with a TabControl. On that TabControl I have 7 or 8 pages and each page will have 1 to 4 Main subforms (not of each other - just of that Page of the TabControl.
I have some code that I only want to execute IF and only if a particular page and it's sub form are the ACTIVE tab that the user is viewing.
I have tried "If xxxx.visible=true then" but even though at the time I execute the doubleclick the form isn't visible because I have the Page set to visible = no at should have run it sees that the subform is "visible" so it does the 'then' and not the 'else' steps.
Any suggestion of another control trigger I can use... (also tried using a txtwait textbox's Got Focus and it didn't do the trick for me.)