From time to time I'm asked to enhance PageFrames by adding one or more new pages. Recently I added a seventh page to a pageframe and set its .PageOrder to 2 to make it the second page, rather than the last. All well and good.
However, there is code in the parent form that depends on hard-coded .ActivePage values e.g.
IF MyPageFrame.ActivePage = 3
...
Most of these are now broken, because what used to be the 2nd page is now the 3rd, third is the 4th etc.
Has anyone come up with a generic handler for this? My first thought is that the name of the page isn't likely to change, regardless of its .PageOrder so I could look at implementing something like
IF MyPageFrame.ActivePageName( MyPageFrame.ActivePage ) = "SomePageName"
...
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up