Option Explicit
'En ListBox En CommandButton
Private Declare Function GetDriveType Lib "kernel32" _
Alias "GetDriveTypeA" (ByVal nDrive As String) As Long
Private Sub Command1_Click()
'2 = Floppy 3 = HD 5 = CD/DVD
Dim i As Long, ret As Long, drv As String
For i = 65 To 90 ' A - Z
ret = GetDriveType(Chr$(i) & ":\")
If ret <> 1 Then
Select Case ret
Case Is = 2
drv = "Floppy"
Case Is = 3
drv = "Harddrive"
Case Is = 5
drv = "CD / DVD"
End Select
List1.AddItem Chr$(i) & " = " & drv
End If
Next 'i
End Sub