After many years of working without problem, my macros suddenly stop working on basic commands, such as the following:
    Selection.Cells(1, 1).FormulaR1C1 = "foo"
    Debug.Print "done"
This example code writes "foo" in the cell, but then stops execution without any warning or error message, and never executes Debug.Print. Setting On Error Resume Next doesn't help.

This doesn't happen consistently, though. When I tried the example in a completely new file, it worked just fine. So I recreated one of the problematic .XLSM files by copying the sheets individually to a new file, and then importing the VBA code into that file, but that didn't help: The problem still exists, even with this simple two-liner.