Origionally by Matt Gates
Code:
Function CDInDrive() As Boolean
On Error GoTo ErrHan
  Dir "D:\", vbDirectory
  DiskInDrive = True
Exit Function
ErrHan:
DiskInDrive = False
End Function

Private Sub Command1_Click()

If CDInDrive() Then
  MsgBox "CD detected"
Else
  MsgBox "No CD detected"
End If

End Sub
Not good...

Some people (like me) has D: as a Hard Drive, so it really is a bad idea. Sorry for the correction, but no...

It'll succeed on D: as CD, but as for E: as CD...