Hi,
I have a code that loops through a range, opening workbooks and copying them over. In some cases the workbook names in the loop will not exist. I'd like a message box to pop up with "File not Found" should this even occur, but I don't know where to put it with the On Error statement. Here's what I have, can someone help me by adding the message box?
Set rng = Range("A4:A5")
For Each row In rng.Rows
For Each cell In row.Cells
On Error Resume Next
Dim errors1 As String
errors1 = "C:\asdf\test\" & Format(cell.Value) & ".csv"
Workbooks.Open errors1, True, True
ThisWorkbook.Sheets(cell.Value).Range("A1:Z50000").Value = ActiveWorkbook.ActiveSheet.Range("A1:Z50000").Value
ActiveWorkbook.Close False
Next cell
Next row
Thanks
Bookmarks