Results 1 to 5 of 5

Thread: Drives

  1. #1
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Unanswered: Drives

    Does anyone know how to get the letters of the attached drives of the computer. I mean A: (Floppy), c:, d:, e: and so on, and determining whether it is a flopy, CD or HHD.
    Thanks

  2. #2
    Join Date
    Nov 2002
    Location
    Norway
    Posts
    239

    Smile

    Try this:

    Private Sub Disk_Drive_Enter()
    On Error Resume Next
    Dim i As Byte, Alphabet As String, Disk_Drive As String
    Disk_Drive = ""
    Alphabet = "ZYXWVUTSRQPONMLKJIHGFEDCBA"

    For i = 1 To Len(Alphabet)
    On Error Resume Next
    ChDrive Mid(Alphabet, i, 1)
    Select Case Err
    Case 0:
    On Error GoTo 0
    Disk_Drive = Mid(Alphabet, i, 1) & ";" & Disk_Drive
    Case 68:
    On Error GoTo 0
    Case Else:
    On Error GoTo 0
    Stop
    End Select
    Next i

    Me.Disk_Drive.RowSource = Disk_Drive
    End Sub

    Sincerely
    Vestigo

  3. #3
    Join Date
    Nov 2002
    Location
    Norway
    Posts
    239
    woooops ! ..... determining whether it is a flopy, CD or HHD. ???
    I dont know.

  4. #4
    Join Date
    Nov 2003
    Posts
    1,487
    Here are a bunch of functions I made up a looong time ago. You may be able to use the Function named, DrivesOnSystem (located somewhere within the document). The function can also optionally inform you of which drives are media ready (floppy in drive, CD in drive, etc.).

    Hope this helps....

    Attached Files Attached Files
    Last edited by CyberLynx; 09-24-04 at 20:06.

  5. #5
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Thank you Vestigo for your function, it helps.
    Thank you CyberLynx for the valuable functions you sent, I think that stuff is very useful.

    Thanks again and have nice time

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •