[COLOR=blue]Sub CrashAutomation()
Dim wb As Workbook
Set wb = Workbooks.Add [COLOR=green]' OK, wb now references a new workbook[/color]
wb.Close [COLOR=green]' Close the workbook. Reference is no longer valid[/color]
wb.Activate [COLOR=green]' Automation error as we are trying to use a method on an invalid object reference[/color]
End Sub[/color]