I had a module with all the logic for connecting to a database. In this forum, you have recommended me to take all the logic to a class and use WAIT FOR, which I needed in a module is not possible. The question is can I create a single instance of the class in a module and ALWAYS use that class? I guess I'll have to create an instance of the (dim) class in every activity where I use it, which is going to bring, I'm afraid, future problems. The main problem is that in the class I launch MSGBOX that I want to stop with wait for, but it gives me an error because the msgbox function fails to detect the activity associated with the msgbox.