I have a form that is used by my company for picking up returned goods from our customers. I have included code to open another form that includes a userform if an error report is required. The code tells excel to open the error report and to close the returned goods report in that order. The problem is that once the error report opens and the userform is used, the code does not close the first workbook. I have attached the code in question. Is there something I am missing? Thanks in advance for any help you can give.


If Range("F32").Value = "Yes" Then
Workbooks.Open ("serverpath\F8.05 Error Report\Error Report.xls")
Else
End If
ThisWorkbook.Close savechanges:=False
End Sub