Private Sub DispLogicalDrives() Dim Drives As Long Dim I As Long Dim Bit As Long Dim Msg As String Bit = 1 'ドライブ一覧取得 Drives = GetLogicalDrives() 'メッセージ作成 For I = Asc("A") To Asc("Z") If (Drives And Bit) <> 0 Then Msg = Msg & Chr(I) & ":" & vbCr End If Bit = Bit * 2 Next '表示 MsgBox Msg End Sub