You're right: it works in the command window. But when I add the code you specify to the click of my commmand button (defined with the container in the Project Manager), it crashes every time.
Here's what I've done: the container class is instantiated by the rightclick of a commandbutton on one page of a pageframe on a form. The container has only a listbox and the "Close" commandbutton, which in turn has the two lines of code
this.parent.visible = .f.
this.parent.parent.removeobject(this.parent.name)
Click and kabooom!
I am baffled. Guess I'll have to shrink the container, but it seems like a bad soultion.
Thanks again for your assistance.
Jim Wheelock