for x = 1 to 5 keyboard '{ctrl+W}' lcclass = 'test' + alltrim(str(x, 3)) create class (lcclass) of test1 as label nowait activate window "Class Designer" endforThe problem is the Ctrl-W is closing one of the other windows, not the designer itself. The above code makes sure the class designer is active at the time the ctrl-w is consumed.