Option Compare Database   'Use database order for string comparisons
Option Explicit

Declare Function CheckDrive% Lib "CHKDRIVE.DLL" (ByVal DriveNo As Integer)

Function DriveReady (Drive As String) As Integer
   Dim x As Integer
   x = 1
   If Left$(Drive, 1) = "B" Then
      x = 2
   End If
   DriveReady = CheckDrive(x)
End Function

