hi,
I have a problem with my directory copy program. When I encounter insuffient privileges to copy the files in the directory, i want it to prompt and exit the operation.
But what I see is that it prompts as many times as the number of files. if there are 5 files in the directory with insuffient privileges then the message box is being shown 5 times. how can i resolve this.
Below is my code
If Err.Number = 75 Then
If InStr(Err.Description, "Path/File access error") > 0 Then
MsgBox "Path/File Access error ! Make sure you have enough privileges to perform this operation", vbCritical, "Copy Error"
Exit Sub
End If
I have a problem with my directory copy program. When I encounter insuffient privileges to copy the files in the directory, i want it to prompt and exit the operation.
But what I see is that it prompts as many times as the number of files. if there are 5 files in the directory with insuffient privileges then the message box is being shown 5 times. how can i resolve this.
Below is my code
If Err.Number = 75 Then
If InStr(Err.Description, "Path/File access error") > 0 Then
MsgBox "Path/File Access error ! Make sure you have enough privileges to perform this operation", vbCritical, "Copy Error"
Exit Sub
End If