Change in VBA library for Excel.workbook?
I have an Access DB developed over several years in which there is a VBA module for exporting selected tables to a single, multi-worksheet Excel file.
After a Windows update this morning, the VBA module fails with a compilation error over this code fragment:
Set Excel = New Excel.Application
Set workbook = Excel.Workbooks.Add
workbook.Sheets("Sheet1").Delete
I am using the built in Visual Basic editor/debugger (via the Database Tools menu), which highlights the text '.Sheets' on the last line and displays the error message 'Method or data member not found'.
This was working yesterday before the Windows update, so I assume either (a) the update screwed up my Microsoft Office installation or (b) the update included some Microsoft Office library changes that mean I need to update my library references. The Visual Basic editor suggests I do have all the correct libraries selected under the 'Tools > References' option, though.
Does anyone know what went wrong, or how to fix it?