After creating a set of controls in code, how can I delete them, in code?
You need to keep a reference to each new member.
When you do for instance
P as new pushbutton1
dim P as Pushbutton the reference goes away as soon as the method/event is over.
If P is a property of the window, you can then do
If you have several controls, you can use P() and do
Then you have all your references in the P() array.