ErrorDisk




Public Function DiskErrors() As Integer
Dim intMsgType As Integer
Dim strMsg As String
Dim intResponse As Integer

Select Case Err.Number
Case 68
strMsg = "That device appears unavailable."
Case 71
strMsg = "Insert a disk in the drive "
Case 57
strMsg = "Internal disk error."
Case 61
strMsg = "Disk is full. Continue?"
Case 76
strMsg = "That path doesn't exist."
Case 54
strMsg = "Can't open your file"
Case 55
strMsg = "This file is already open."
Case 53
strMsg = "This file is Not found."
Case 62
strMsg = "There was a problem With this file"
Case Else
DiskErrors = 1
Exit Function
End Select
intResponse = MsgBox(strMsg, _
vbExclamation + vbAbortRetryIgnore, "Disk Error")

Select Case intResponse
Case vbAbort
DiskErrors = 1
Case vbRetry
DiskErrors = 2
Case vbIgnore
DiskErrors = 3
End Select
End Function











( errordisk.html )- by Paolo Puglisi - Modifica del 17/12/2023