Hi,
I am new to scripting and was hoping that someone could provide me with some assistance with the error that I am receiving. Here is my code:
Public Const RESUME_STATEMEN T = 0 'Resume
Public Const RESUME_NEXT = 1 'Resume Next
Public Const UNRECOGNIZED = 3 'Unrecognized error
Public Const ERR_PERMISSIOND ENIED = 70
Function FileErrors(errV al As Integer) As Integer
Dim MsgType As Integer, Msg As String, Response As Integer
MsgType = vbExalamation
Select Case errVal
Case ERR_PERMISSIOND ENIED 'Error #70
Msg = "That device is unavailable."
MsgType = MsgType + vbokIgnore
Case Else
FileErrors = UNRECOGNIZED
Exit Function
End Select
Response = MsgBox(Msg, MsgType, "Disk Error")
Select Case Response
Case vbOK
FileErrors = RESUME_STATEMEN T
Case vbIgnore
FileErrors = RESUME_NEXT
Case Else
FileErrors = UNRECOGNIZED
End Select
End Function
I am trying to setup a function for error handling, specifically to test handling the error permission denied ... I get a compile error of:
' ) ' expected in the following line:
Function FileErrors(errV al As Integer) As Integer
Any help is appreciated .. cheers, Natasha
I am new to scripting and was hoping that someone could provide me with some assistance with the error that I am receiving. Here is my code:
Public Const RESUME_STATEMEN T = 0 'Resume
Public Const RESUME_NEXT = 1 'Resume Next
Public Const UNRECOGNIZED = 3 'Unrecognized error
Public Const ERR_PERMISSIOND ENIED = 70
Function FileErrors(errV al As Integer) As Integer
Dim MsgType As Integer, Msg As String, Response As Integer
MsgType = vbExalamation
Select Case errVal
Case ERR_PERMISSIOND ENIED 'Error #70
Msg = "That device is unavailable."
MsgType = MsgType + vbokIgnore
Case Else
FileErrors = UNRECOGNIZED
Exit Function
End Select
Response = MsgBox(Msg, MsgType, "Disk Error")
Select Case Response
Case vbOK
FileErrors = RESUME_STATEMEN T
Case vbIgnore
FileErrors = RESUME_NEXT
Case Else
FileErrors = UNRECOGNIZED
End Select
End Function
I am trying to setup a function for error handling, specifically to test handling the error permission denied ... I get a compile error of:
' ) ' expected in the following line:
Function FileErrors(errV al As Integer) As Integer
Any help is appreciated .. cheers, Natasha
Comment