VB - TabControl - SubForm - do some code ONLY If it is the Active tab subform
Hello again.
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.)
Case 0 means something like in english
"in case 0 changed then do this code"
"in Case 1 changed then do that code"
meaning where "Page 0 (tab) changed" or
where "Page 1 (tab) changed" etc...
Am I understanding that right?