After spending several long evenings it became apparent that there was no good way to tell what page in a PageFrame was active from outside the PageFrame.I know you have PageFrame.activepage, PageFrame.tabindex, you have the objects and the pages collection to look at. But, if your pages change based upon selections that the user makes such as Security setting, If the pages get rearranged, there is no good way to tell what page you're on. The ActivePage and TabIndex properties tell you the number of the page starting from the left. This however is not necessarily the object or page number in the object and page collections.
So after a bit of thought, a simple solution, I created my own PageFrame Subclass.
Make the page count 0. If you include any pages in your subclass, you can't rename them in the object once placed on a form. I happen to like names a bit more descriptive than "Page1", and "Page2" - they sound like something out of Doctor Suess.
Then create a property called "ActivePageName" and set it's default value to (None) instead of .f. Otherwise if you try to check your property before the pageFrame becomes "Active" (not initialized), you will get an error.
Now each time you add a page, simple put the line.
This.Parent.ActivePageName = This.Name
In the activate event of each page.
Why Microsoft doesn't give us such a property I don't know, but it saves lots of headaches.
Jay Hudson Jay@isasi.com