Hi Luca: I think you can do either one of these methods below without declaring the page object as public. I am checking with you because you have become a powerhouse to be reckoned with in B4XPages.
B4X:
B4XPages.ClosePage(B4XPages.MainPage.MyThirdPage)
or:
B4X:
B4XPages.ClosePage(MyThirdPage)
Knowing you get by with little sleep, you do not need to rush to answer. This can wait till tomorrow.
but from within the B4XMainPage only. By declaring the pages public, as mentioned previously, you can manage them (even close them, as in this case) from within any other page that is not the B4XMainPage.
They, the B4XPages, are simply objects like any other; if in a module they are declared public, they will be accessible from anywhere in the project.