home *** CD-ROM | disk | FTP | other *** search
- Attribute VB_Name = "Module1"
- Public CDDRIVE As String
-
-
- Function GetCDDrive() As String
- On Error GoTo errore
- Dim a As Integer
-
- a = Asc("c")
- While a < Asc("z")
- Open Chr(a) & ":\CDC\SYSTEMS\ivano.txt" For Input As 1
- Close 1
- GetCDDrive = Chr(a)
- Exit Function
- Wend
-
- errore:
- a = a + 1
- If Chr(a) > "z" Then
- If ErrorHandle("Errore nella ricerca del drive CD ROM") Then
- a = Asc("c")
- Resume
- Else
- End
- End If
- Else: Resume
- End If
- End Function
-
- Public Function ErrorHandle(errormsg As String) As Boolean
- Dim hr As VbMsgBoxResult
-
- hr = MsgBox(errormsg & Chr(13) & "Continuare ?", vbYesNo, "Catalogo Computer Discount: Errore")
- If hr = vbYes Then
- ErrorHandle = True
- Else
- ErrorHandle = False
- End If
- End Function
-
-