This is usually related to a corrupt macro or schematic sheet. There is no known cause for this corruption of the schematic sheet, but copying the schematic elements to a new sheet and creating a new macro with that new sheet fixes the problem.
The macro to look for will the named by the error message under the [objectname].