do Set oWMP = CreateObject("WMPlayer.OCX.7") Set colCDROMs = oWMP.cdromCollection if colCDROMs.count >= 1 then for i = 0 to colCDROMs.count - 1 colCDROMs.item(i).Eject next ' cdrom End If loop