The straight path through the mud would be:
Sub RV10()
'
' RV10 Macro
'
Dim x As Long
For x = 6 To 37
On Error GoTo ErrorHandler
Workbooks.Open Range("S" & x).Value
Range("D191").Select
Selection.Copy
Windows("LB Billings Figures 2013.xls").Activate
Range("D" & x).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Workbooks(Sheets("Details").Range("T" & x).Value).Activate
ActiveWindow.Close
Calculate
ResumePoint:
Next x
ErrorHandler:
Range("D" & x).Select
ActiveCell.FormulaR1C1 = "Error"
Resume ResumePoint
Exit Sub
End Sub
But it would be far better to test for the existence of each file before you tried to open it:
If Dir(Range("S" & x).Value) <> "" Then
Bookmarks