The following Visual Basic project contains the source code and Visual Basic examples used for open cd rom tray. These sub procedures open and close the CD tray. The controls, command1_click() and command2_click(), must both be separate command buttons, not control arrays.