Well this is new.
My spreadsheet was working fine last night. This morning I open it up and all my VB code is gone. Upon looking at the worksheets in the VB editor, every one of them says this:
I didn't write that code. But even if I did, I would not have placed it in every worksheet.
This all started when I tried running a macro which produced this error message:
When searching on that message yielded little help, it motivated me to dig further and that's when I found all my code had been replaced. In times like this, I try resaving it as another file, but Excel couldn't even do that citing that the file was too damaged to save anything.
I'm going to try to copy/paste my code from a backup file to see if that solves the problem. But what on earth would cause such a thing and can it be prevented?
My spreadsheet was working fine last night. This morning I open it up and all my VB code is gone. Upon looking at the worksheets in the VB editor, every one of them says this:
VBA Code:
Sub Macro1()
'
' Macro1 Macro
'
'
Selection.EntireColumn.Hidden = False
End Sub
I didn't write that code. But even if I did, I would not have placed it in every worksheet.
This all started when I tried running a macro which produced this error message:
System error &H80070057 (-2147024809). The parameter is incorrect.
When searching on that message yielded little help, it motivated me to dig further and that's when I found all my code had been replaced. In times like this, I try resaving it as another file, but Excel couldn't even do that citing that the file was too damaged to save anything.
I'm going to try to copy/paste my code from a backup file to see if that solves the problem. But what on earth would cause such a thing and can it be prevented?