Tonis,
You can use keyboard command to close and save the class. The class will flash on the screen, which may or may not be a problem.
create class .... nowait
keyboard "{CTRL+F4}Y"
Also, you can use the ADD CLASS command to make a copy of a class.
>Is there a command that does the same as CREATE CLASS, but
>without opening the Class Designer? IOW: programmatically
>create a class based on another class stored in a .vcx and
>save it in the specified .vcx
Steve Gibson