I have code within an Excel Addin that modifies code in 2 events of the ThisWorkbook module in a seperate workbook. The code is modified correctly and without error and executing the wb.save method works with no problem. If however I call wb.close I get a Compile Error stating that there is an End If Without Block If. If I do not call the close method and at the endof the code execution manually close the workbook (not using code) there is no error. Bottom line is that the If statement is solid and not missing any syntax but trying to close the workbook via code trips the error. Any ideas? If anyone has any sugesstions on what keywords to use for a Google search on this that would be fine as well.
Thanks
Ed