C
Chad
Hi
I have a list of files, with the directory path from cells a1 to a10
and want to check to see if any do not exist. I would like the file
names assigned to an array in vba, check them off and if one does not
exist stop the code running with an error message.
Here is what I have works well for one file.
Sub test2()
Dim sName As String
sName = Range("A2").Value
If Dir(sName) <> "" Then
'do nothing in this case
Else
MsgBox "file Not found, stop the code at this point"
'file was found
End If
End Sub
Thanks
Chad
I have a list of files, with the directory path from cells a1 to a10
and want to check to see if any do not exist. I would like the file
names assigned to an array in vba, check them off and if one does not
exist stop the code running with an error message.
Here is what I have works well for one file.
Sub test2()
Dim sName As String
sName = Range("A2").Value
If Dir(sName) <> "" Then
'do nothing in this case
Else
MsgBox "file Not found, stop the code at this point"
'file was found
End If
End Sub
Thanks
Chad