# Re: 请问如何得知磁碟机是否已ready?

Posted by 老怪 on September 27, 1998 at 21:13:49:

In Reply to: 请问如何得知磁碟机是否已ready? posted by Jordan on September 25, 1998 at 07:58:21:

: 例如现在的光碟机是否有disc或 A: 是否有磁片??

Private Sub Command1_Click()
Dim OldPath As String

On Error Resume Next
OldPath = CurDir
ChDrive "a:"
Select Case Err.Number
Case 68
MsgBox Err.Description, vbOKOnly, "错误代码：" & Err.Number
End Select

ChDrive OldPath

End Sub

Follow Ups: