I have found what I think is a bug in Excel and I wondered whether anyone else has seen it, or if there is a setting that can avoid the problem.
Problem statement: If I open a xlsm workbook (that contains macros) when (a) the active cell contains a Data Validation message, and (b) there is already another Excel workbook open; then the "Enable Contents" prompt does not appear. However if you minimise
the workbook and switch to the previously-opened workbook and then switch back to the macro workbook, the Enable Contents prompt appears as it should.
I am using Excel 2010 on Windows 7.
I can reproduce it minimally like this:
(1) Create new workbook, and for cell A1: Data>Data Validation>Input Message -- enter a single space for the message. When you OK it, cell A1 will be active and will have a small yellow bow next to it. (So there is no data validation for that cell, just
the validation message consisting of a single space).
(2) Create a Workbook_Open macro with MsgBox "Macros working" (anything so that the workbook should ask whether to Enable Content).
(3) Save workbook with A1 still the active cell. Let's call this workbook1.
Now open Excel with any other workbook (let's call it workbook2), then open workbook1. For me, the Enable Content prompt does not appear. If you minimise or swap back to workbook2, then come back to workbook1, the prompt suddenly appears.
If in step (3) above you save the workbook1 with a different cell active, then when you open it again the Enable Content prompt always appears and all is well.
Has anyone else ever seen this? Is it well know? I have not found any reference to it anywhere. Should I report it to Microsoft somehow?