dim sh, f, i, v set sh = CreateObject("Shell.Application") set f = sh.NameSpace(17) 'My Computer' for each i in f.Items ' MsgBox i.Name & "=" & i.Type if (i.Type = "CD Drive") then for each v in i.Verbs if (v.Name = "E&ject") then v.DoIt() end if next end if next