When Huey was little, I had one of these. 
Precision Pet Silver Exercise Pen with Door - Dog.com
I had his crate and potty patch inside it. He never monkeyed over the top, thank goodness, and eventually I just started letting him loose in the bedroom with the bedroom door closed when we left the house (after we got him stairs to get on the bed).
The only monkey thing he would do is get into the bottom of the 24 inch high laundry basket and retrieve socks and panties without ever falling in or getting stuck. Never could quite figure out how something so tiny could do that.
