The layout one seems to be a bug. I tested in both '06 and '08 and get the same thing. It will delete the layout from the current drawing, not the one open with ObjectDBX.
The layer one isn't hard. You would just step through the layer collection ( vlax-for ... ) and when you find the one you want, change the 'Freeze' property to what you want.