Private Function blnCheckFDProtected() As Boolean
On Error GoTo ErrWrite
    
    strFloppyDrv = "A:\"
    strWriteTest = strFloppyDrv & "WriteTest"
    intFileNum = FreeFile
    Open strWriteTest For Binary Access Write As #intFileNum
    Close
    Kill strWriteTest
    blnCheckFDProtected = True
    Exit Function
ErrWrite:
        If Err.Number > 0 Then
             Select Case Err.Number
             Case 70
                     'protected mode
                     blnCheckFDProtected = False
                     MsgBox "protected mode"
             Case Else
                     MsgBox Err.Description
                     blnCheckFDProtected = False
             End Select
         End If
End Function试试上边的代码吧