I had this problem also, on the bottom of the ashtray carrier (not the removable insert) is a small plastic pin which engages with a locking mechanism in the ashtray assembly; ageing of the plastic and general usage will case this plastic pin to break off of the bottom of the ashtray carrier which you can see if you pull it out and flip it over, the bottom is generally very smooth and where the pin used to be should show as a slight flaw in the finish of the ashtray carrier.
The fix is also very simple and will cost you nothing other than some time (5-10 minutes, or more if you have to rummage), when you have located where the pin used to be on the bottom take the smallest drill bit you have and drill a hole where the pin used to be; then use a brad (nail) for hanging medium sized pictures (18 x20) and press it through the hole from the inside of the ashtray carrier until it is fully seated and poking out from the bottom, then use wire cutter to trim the brad (nail) so only about an 1/8th of an inch is protruding from the bottom. Reinsert the ashtray carrier into the guide rails in the dash assembly and it should latch closed when operated, open and close it a few times to ensure that it engages each time and that it releases smoothly; if it doesn't stay closed or doesn't open smoothly then you may have to adjust the trimmed length of the brad, it may also be possible that the latching mechanism is broken and you'll have to buy a whole new assembly.
One last note, pick the brad and size the drill bit accordingly; a slightly smaller hole with a snug press fit is preferable to having to glue the thing in, I wish I had taken pictures to illustrate but it was so blindingly easy that it was done and over with before the thought had occurred.